DDC-2649: Hydration in bidirectional, OneToOne relationship, PK as FK for owning side, is problematic #3324

Open
opened 2026-01-22 14:18:01 +01:00 by admin · 0 comments
Owner

Originally created by @doctrinebot on GitHub (Sep 4, 2013).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user jerive:

I am referring to this situation https://gist.github.com/anonymous/6435032

The following problem occur:

When using HardCover as the root entity of a query, the ObjectHydrator fails to properly register the first [HardCover of the resultset]'s Book. Only the first. The following HardCover have their Books correctly linked. The inverse situation (using Book as the root entity) works fine.

When some other entity (say WoodenPart) is linked to HardCover via a ManyToOne association, using WoodenPart as a query root results in no WoodenPart have their HardCover registered.

Originally created by @doctrinebot on GitHub (Sep 4, 2013). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user jerive: I am referring to this situation https://gist.github.com/anonymous/6435032 The following problem occur: When using HardCover as the root entity of a query, the ObjectHydrator fails to properly register the first [HardCover of the resultset]'s Book. Only the first. The following HardCover have their Books correctly linked. The inverse situation (using Book as the root entity) works fine. When some other entity (say WoodenPart) is linked to HardCover via a ManyToOne association, using WoodenPart as a query root results in no WoodenPart have their HardCover registered.
admin added the Bug label 2026-01-22 14:18:01 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#3324