DDC-3583: [GH-1309] [DDC-3582] Fix hydration of nested embeddables #4405

Closed
opened 2026-01-22 14:41:04 +01:00 by admin · 3 comments
Owner

Originally created by @doctrinebot on GitHub (Feb 22, 2015).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user @doctrinebot:

This issue is created automatically through a Github pull request on behalf of jankramer:

Url: https://github.com/doctrine/doctrine2/pull/1309

Message:

The wrong class is chosen when hydrating embeddables that are part of a nested structure. See DDC3582Test for a demonstration. The fix is to use class instead of embeddedClass to instantiate the embeddable in ReflectionEmbeddedProperty.

The test I removed from ReflectionEmbeddedPropertyTest was failing because you cannot instantiate an abstract class (and rightfully so). However, as this would not be possible in practice anyway (you always end up extending the abstract class), I think this test can be removed safely.

Originally created by @doctrinebot on GitHub (Feb 22, 2015). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user @doctrinebot: This issue is created automatically through a Github pull request on behalf of jankramer: Url: https://github.com/doctrine/doctrine2/pull/1309 Message: The wrong class is chosen when hydrating embeddables that are part of a nested structure. See `DDC3582Test` for a demonstration. The fix is to use `class` instead of `embeddedClass` to instantiate the embeddable in ReflectionEmbeddedProperty. The test I removed from ReflectionEmbeddedPropertyTest was failing because you cannot instantiate an abstract class (and rightfully so). However, as this would not be possible in practice anyway (you always end up extending the abstract class), I think this test can be removed safely.
admin added the Bug label 2026-01-22 14:41:04 +01:00
admin closed this issue 2026-01-22 14:41:04 +01:00
Author
Owner

@doctrinebot commented on GitHub (Feb 22, 2015):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-1309] was closed:
https://github.com/doctrine/doctrine2/pull/1309

@doctrinebot commented on GitHub (Feb 22, 2015): Comment created by @doctrinebot: A related Github Pull-Request [GH-1309] was closed: https://github.com/doctrine/doctrine2/pull/1309
Author
Owner

@doctrinebot commented on GitHub (Feb 27, 2015):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-1311] was assigned:
https://github.com/doctrine/doctrine2/pull/1311

@doctrinebot commented on GitHub (Feb 27, 2015): Comment created by @doctrinebot: A related Github Pull-Request [GH-1311] was assigned: https://github.com/doctrine/doctrine2/pull/1311
Author
Owner

@doctrinebot commented on GitHub (Feb 27, 2015):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-1311] was merged:
https://github.com/doctrine/doctrine2/pull/1311

@doctrinebot commented on GitHub (Feb 27, 2015): Comment created by @doctrinebot: A related Github Pull-Request [GH-1311] was merged: https://github.com/doctrine/doctrine2/pull/1311
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#4405