Thorsten Goetzke (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=6422e66...
) *commented* on HHH-16218 (
https://hibernate.atlassian.net/browse/HHH-16218?atlOrigin=eyJpIjoiY2E5YT...
)
Re: Natural id cache is extremely slow for entities with compound natural id (
https://hibernate.atlassian.net/browse/HHH-16218?atlOrigin=eyJpIjoiY2E5YT...
)
Hello,
I am locally patching around that as well. A simple Arrays.hashCode() seems to break,
because it can cause entity loading
org.hibernate.proxy.AbstractLazyInitializer.initialize-> into afterTransaction → into
org.hibernate.resource.jdbc.internal.ResourceRegistryStandardImpl.releaseResources and
after that sometimes some JDBC Statements are closed that are expected to be open.
My current idea is to try this, which is probably not correct in all cases, but at least
it doesnt crash the application or makes it so slow that it might as well be crashed…:
My argument would be that it would be nice if there was an option to completly turn off
the entire Natural-Id cache handling. Our application never uses Natural id lookup, the
natural ids are just there so that the sql schema generation creates the required unique
constraints. As a workaround we could convert natural-ids to explicit unique constraints,
but thats a lot of rewriting.
(
https://hibernate.atlassian.net/browse/HHH-16218#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16218#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#100219- sha1:6a6077b )