Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1382

getIdentifierValues causes an exception on entyties that have only association keys

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.1.3
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None
    • Environment:
      ubuntu

      Description

      On entities that have only association keys as primary keys:

      Calling BasicEntityPersister::exists() cause the invocation of ClassMetadata::getIdentifierValues() method.
      This method returns associated entities as identifier values.
      Then BasicEntityPersister::exists() tries to converts these objects to string, instead of searching their primary keys.

      Some problems:

      • getIdentifierValues have not access to external world (only its class metadata and the current entity).
      • getIdentifierValues is uses in many places of doctrine

      (sorry for my bad English)

        Activity

        Asmir Mustafic created issue -
        Guilherme Blanco made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Benjamin Eberlei [ beberlei ] Guilherme Blanco [ guilhermeblanco ]
        Fix Version/s 2.1.4 [ 10165 ]
        Resolution Fixed [ 1 ]
        Benjamin Eberlei made changes -
        Fix Version/s 2.1.3 [ 10164 ]
        Fix Version/s 2.1.4 [ 10165 ]
        Benjamin Eberlei made changes -
        Workflow jira [ 13026 ] jira-feedback [ 15030 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback [ 15030 ] jira-feedback2 [ 16894 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback2 [ 16894 ] jira-feedback3 [ 19147 ]

          People

          • Assignee:
            Guilherme Blanco
            Reporter:
            Asmir Mustafic
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: