[hibernate-issues] [JIRA] (HHH-14069) LazyLoad with singleTable inheritance don't use discriminatorValue

Florian Kern (JIRA) jira at hibernate.atlassian.net
Fri Jun 12 06:03:03 EDT 2020


Florian Kern ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5ee102ca96beaa0aae0970ea ) *updated* an issue

Hibernate ORM ( https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiN2JhMjMzNTQzOTFmNDRmYmJkZDUyYjdlNzhmOGRjMWQiLCJwIjoiaiJ9 ) / Bug ( https://hibernate.atlassian.net/browse/HHH-14069?atlOrigin=eyJpIjoiN2JhMjMzNTQzOTFmNDRmYmJkZDUyYjdlNzhmOGRjMWQiLCJwIjoiaiJ9 ) HHH-14069 ( https://hibernate.atlassian.net/browse/HHH-14069?atlOrigin=eyJpIjoiN2JhMjMzNTQzOTFmNDRmYmJkZDUyYjdlNzhmOGRjMWQiLCJwIjoiaiJ9 ) LazyLoad with singleTable inheritance don't use discriminatorValue ( https://hibernate.atlassian.net/browse/HHH-14069?atlOrigin=eyJpIjoiN2JhMjMzNTQzOTFmNDRmYmJkZDUyYjdlNzhmOGRjMWQiLCJwIjoiaiJ9 )

Change By: Florian Kern ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5ee102ca96beaa0aae0970ea )

please see the attached test case.

With singleTable inheritance lazyLoad is triggered, without the discriminator value in the SQL Statement. In consequence there are wrong mapped objects in the collection. In the later, if the entityManager knows the wrong mapped object and the secound second collection triggerLazy load, there is a org.hibernate.WrongClassException thrown.

( https://hibernate.atlassian.net/browse/HHH-14069#add-comment?atlOrigin=eyJpIjoiN2JhMjMzNTQzOTFmNDRmYmJkZDUyYjdlNzhmOGRjMWQiLCJwIjoiaiJ9 ) Add Comment ( https://hibernate.atlassian.net/browse/HHH-14069#add-comment?atlOrigin=eyJpIjoiN2JhMjMzNTQzOTFmNDRmYmJkZDUyYjdlNzhmOGRjMWQiLCJwIjoiaiJ9 )

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.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100128- sha1:14a4bff )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200612/a9eaa6b3/attachment.html 


More information about the hibernate-issues mailing list