mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
ManyToOne association entity identifier #5424
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @podorozhny on GitHub (Feb 22, 2017).
Originally assigned to: @Ocramius on GitHub.
Hi everyone.
I ran into a problem using many-to-one association between entities while using custom property (not @ORM\Id() one) to join mapped entity.
Simplified example:
bin/console doctrine:schema:validatesaid all mappings are okay, but when I tried to insert new user I got this error:https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php#L671
I got
['id' => 100500]here instead of['secondId' => 100500].Thanks.
@lcobucci commented on GitHub (Feb 23, 2017):
@podorozhny it seems odd, can you please send a PR with a test that reproduce that issue (we can use
e4704beaf9/tests/Doctrine/Tests/ORM/Functional/Ticket/GH5762Test.phpas example).@podorozhny commented on GitHub (Feb 23, 2017):
@lcobucci
https://github.com/doctrine/doctrine2/pull/6301
@lcobucci commented on GitHub (Feb 23, 2017):
@podorozhny awesome, thanks!
@Ocramius commented on GitHub (Feb 25, 2017):
Closing as
invalidas per #6301 findings