Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1448

Add a base entity to allow users to skip writing boilerplate code

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2
    • Component/s: ORM
    • Security Level: All
    • 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.

        Activity

        Hide
        Benjamin Eberlei added a comment -

        Implemented in Doctrine\Common\Persistence\PersistentObject.

        This can be generically used by all ObjectManagers.

        Show
        Benjamin Eberlei added a comment - Implemented in Doctrine\Common\Persistence\PersistentObject. This can be generically used by all ObjectManagers.
        Hide
        Alexander added a comment -

        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
        Show
        Alexander added a comment - 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

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Benjamin Eberlei
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: