[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


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.

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 Wed Nov 25 22:21:10 EST 2015 using JIRA 6.4.10#64025-sha1:5b8b74079161cd76a20ab66dda52747ee6701bd6.