Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-388

Private properties in @MappedSupperclass don't work

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0-BETA1
    • Component/s: Mapping Drivers
    • Security Level: All
    • Labels:
      None
    • Environment:
      PHP 5.3.1

      Description

      All of my entites extend an abstract class Model to inherit the 'id' property and some other functionality. It has the @MappedSuperclass annotation.

      If the id property is declared private to the Model class, I'll get the following exception when using entites extending it:

      [03-Mar-2010 11:36:29] exception 'ReflectionException' with message 'Property id does not exist' in library/Doctrine/ORM/Mapping/ClassMetadata.php:370
      Stack trace:
      #0 library/Doctrine/ORM/Mapping/ClassMetadata.php(370): ReflectionClass->getProperty('id')
      #1 [internal function]: Doctrine\ORM\Mapping\ClassMetadata->__wakeup()
      ...
      

      I haven't looked at Doctrine code, but perhaps you should be looking for the property on the class which actually has the @Column annotation?

        Issue Links

          Activity

          Jaka Jancar created issue -
          Hide
          Roman S. Borschel added a comment -

          Yes, I think the 'inherited' key is simply not set for fields that are inherited from mapped superclasses. This needs to be fixed.

          Show
          Roman S. Borschel added a comment - Yes, I think the 'inherited' key is simply not set for fields that are inherited from mapped superclasses. This needs to be fixed.
          Roman S. Borschel made changes -
          Field Original Value New Value
          Fix Version/s 2.0-BETA2 [ 10050 ]
          Roman S. Borschel made changes -
          Priority Minor [ 4 ] Major [ 3 ]
          Roman S. Borschel made changes -
          Priority Major [ 3 ] Critical [ 2 ]
          Roman S. Borschel made changes -
          Link This issue is duplicated by DDC-456 [ DDC-456 ]
          Roman S. Borschel made changes -
          Fix Version/s 2.0-BETA1 [ 10030 ]
          Fix Version/s 2.0-BETA2 [ 10050 ]
          Roman S. Borschel made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Hide
          Roman S. Borschel added a comment -

          Fixed in http://github.com/doctrine/doctrine2/commit/d4232d906e433b1fe4dd8aa85aa7a4aca3a2cf4c .
          Make sure to clear the metadata cache if necessary.

          Show
          Roman S. Borschel added a comment - Fixed in http://github.com/doctrine/doctrine2/commit/d4232d906e433b1fe4dd8aa85aa7a4aca3a2cf4c . Make sure to clear the metadata cache if necessary.
          Roman S. Borschel made changes -
          Status In Progress [ 3 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Benjamin Eberlei made changes -
          Workflow jira [ 10985 ] jira-feedback [ 15569 ]
          Benjamin Eberlei made changes -
          Workflow jira-feedback [ 15569 ] jira-feedback2 [ 17433 ]
          Benjamin Eberlei made changes -
          Workflow jira-feedback2 [ 17433 ] jira-feedback3 [ 19690 ]

          This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

          • Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DDC-388, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

            People

            • Assignee:
              Roman S. Borschel
              Reporter:
              Jaka Jancar
            • Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: