Skip to content

Loading…

DDC-837: Two children in inheritance with same property name causes error in hydration #5357

Closed
doctrinebot opened this Issue · 6 comments

2 participants

@doctrinebot

Jira issue originally created by user mridgway:

This is related to DDC-258. The issue seems to be fixed with regular column types (string, int, etc) but the same issue has cropped up when we have a OneToOne relationship in two child classes that share the same property name. I have modified the DDC258TestCase class to demonstrate the error.

To summarize: two classes that inherit from the same class happen to have a property with the same name. Both of them are oneToOne relationships. Querying for the objects, one object type (depending on discriminatorMap order) will be hydrate correctly but the other will always be null.

@doctrinebot

Comment created by @beberlei:

This is not a bug, its documented behavior and is technically not feasible.

@doctrinebot

Comment created by mridgway:

Why would this not be feasible on relationships even though it is on regular column types? I feel like this is the same issue as DDC-258. I understand a child can't have a property named the same as the parent's, but two children should be able to have properties with the same name (and currently can if it's not a relationship).

@doctrinebot

Comment created by @beberlei:

oh maybe i am wrong :-)

@doctrinebot

Comment created by @beberlei:

Fixed

@doctrinebot

Issue was closed with resolution "Fixed"

@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.0.1 milestone
@doctrinebot doctrinebot closed this
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.