Christian Beikov (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *updated* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiYTMyM2Y4NGVl...
) / Improvement (
https://hibernate.atlassian.net/browse/HHH-16571?atlOrigin=eyJpIjoiYTMyM2...
) HHH-16571 (
https://hibernate.atlassian.net/browse/HHH-16571?atlOrigin=eyJpIjoiYTMyM2...
) Avoid root table join for FK access of key-many-to-one (
https://hibernate.atlassian.net/browse/HHH-16571?atlOrigin=eyJpIjoiYTMyM2...
)
Change By: Christian Beikov (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
An entity model with a key-many-to-one that uses joined inheritance always has to join the
root table when querying a subclass, even if no attributes of the super types are used.
This is unfortunately because the FK of the {{ToOneAttributeMapping}} uses the root table
information for the mapping.
We should try to optimize this in
{{org.hibernate.metamodel.mapping.internal.MappingModelCreationHelper#interpretToOneKeyDescriptor}}
to be able to avoid always joining.
Note that there is code which build builds on the current behavior, but I added a TODO
comment with this Jira key along with explanation of what needs to be done.
(
https://hibernate.atlassian.net/browse/HHH-16571#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16571#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100225- sha1:bbd69a1 )