[hibernate-issues] [JIRA] (HSEARCH-3896) Verify multiple loading with the DefaultProjectionHitMapper on the same query instance

Yoann Rodière (JIRA) jira at hibernate.atlassian.net
Fri Apr 17 05:04:51 EDT 2020


Yoann Rodière ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A58fa1ced-171a-4c00-97e8-5d70d442cc4b ) *commented* on HSEARCH-3896 ( https://hibernate.atlassian.net/browse/HSEARCH-3896?atlOrigin=eyJpIjoiNzdjOTIxOTE3OGU3NDEzNzlhNDFiY2JhZGQwOGYyZGYiLCJwIjoiaiJ9 )

Re: Verify multiple loading with the DefaultProjectionHitMapper on the same query instance ( https://hibernate.atlassian.net/browse/HSEARCH-3896?atlOrigin=eyJpIjoiNzdjOTIxOTE3OGU3NDEzNzlhNDFiY2JhZGQwOGYyZGYiLCJwIjoiaiJ9 )

Good catch, thanks.

DefaultProjectionHitMapper can't be stateless because its purpose is to hold a mutable list of references to load. We need to turn getProjectionHitMapper into a factory method, or to make sure DefaultProjectionHitMapper clears it state after loading.

I think the first solution is more robust as it will work even if a search query fails after having added references to the hit mapper but before loading entities.

( https://hibernate.atlassian.net/browse/HSEARCH-3896#add-comment?atlOrigin=eyJpIjoiNzdjOTIxOTE3OGU3NDEzNzlhNDFiY2JhZGQwOGYyZGYiLCJwIjoiaiJ9 ) Add Comment ( https://hibernate.atlassian.net/browse/HSEARCH-3896#add-comment?atlOrigin=eyJpIjoiNzdjOTIxOTE3OGU3NDEzNzlhNDFiY2JhZGQwOGYyZGYiLCJwIjoiaiJ9 )

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#100124- sha1:93e2dd3 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200417/01c6ea1b/attachment.html 


More information about the hibernate-issues mailing list