[DDC-1448] Add a base entity to allow users to skip writing boilerplate code Created: 22/Oct/11  Updated: 19/Nov/11  Resolved: 19/Nov/11

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: ORM
Affects Version/s: None
Fix Version/s: 2.2
Security Level: All

Type: Improvement Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

For forward compatibility with https://gist.github.com/1034079 we want to add a "BaseEntity" into the core that handles boilerplate code through implementing "__call" and using the metadata to generate getter/setter/adder/is methods on the fly.



 Comments   
Comment by Alexander [ 30/Oct/11 ]

Had some discussion about this on IRC:

  • the BaseEntity shouldn't do __callStatic since there are already repositories that do stuff like this
  • for php 5.3 it would be shipped as a class that can be extended
  • maybe some task that generates the trait from the class or the other way around
Comment by Benjamin Eberlei [ 19/Nov/11 ]

Implemented in Doctrine\Common\Persistence\PersistentObject.

This can be generically used by all ObjectManagers.

Generated at Sat Oct 25 12:45:46 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.