Skip to content

Loading…

DDC-152: Polymorphic queries and fields of subclasses #2151

Closed
doctrinebot opened this Issue · 1 comment

1 participant

@doctrinebot

Jira issue originally created by user romanb:

Currently fields of subclasses are added to the ResultSetMapping under the alias of the queried (parent) class. Later during hydration if the queried (parent) class does not own a field AbstractHydrator#_lookupDeclaringClass looks up the first subclass that defines a field with that name. However, multiple subclasses can define a field with the same name, so this is error-prone.

Fields of subclasses in a polymorphic query should probably be added to the ResultSetMapping with their own alias. The lookup during hydration should be removed and the information which field belongs to which class encoded in the ResultSetMapping.

@doctrinebot

Issue was closed with resolution "Fixed"

@doctrinebot doctrinebot added this to the 2.0-ALPHA4 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.