On 21 January 2015 at 15:30, Tom <[email protected]> wrote: > Can you give more information about the kind of messy problems encoutered > with identies though foreign identity, it seems to me like a regular use > case in many situations ... >
This kind of messy stuff :-) I suggest writing a test case for your broken use-case (it would help us a lot!), and checking https://github.com/doctrine/doctrine2/pull/1113, which may be strictly related to your use-case. Other problems that are known are proxy identifier values. Consider following case: class Foo { /** @Id @Column */ public $id; } class Bar { /** @Id @ManyToOne(targetEntity="foo") */ public $foo; } Following code will currently fail (assuming populated values on the DB): $this->assertInstanceOf('Foo', $em->getReference('Bar', 123)->foo); This is checked in https://github.com/doctrine/doctrine2/pull/1189 So yes, identifiers through associations are quite messy right now, and even though we are getting close to very nicely working code, we are still not there yet. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ -- You received this message because you are subscribed to the Google Groups "doctrine-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/doctrine-user. For more options, visit https://groups.google.com/d/optout.
