[hibernate-issues] [JIRA] (HHH-13915) Shared interceptor in BasicProxyFactoryImpl leads to intermittently broken persistence

Henry Clout (JIRA) jira at hibernate.atlassian.net
Mon Mar 30 18:55:16 EDT 2020


Henry Clout ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5bd6e4bbdd3cc64b77e71f5f ) *commented* on HHH-13915 ( https://hibernate.atlassian.net/browse/HHH-13915?atlOrigin=eyJpIjoiZTlkMTc4NjFmZmNmNGQxYmE0MmZkMTY0YTBkY2Y1MTQiLCJwIjoiaiJ9 )

Re: Shared interceptor in BasicProxyFactoryImpl leads to intermittently broken persistence ( https://hibernate.atlassian.net/browse/HHH-13915?atlOrigin=eyJpIjoiZTlkMTc4NjFmZmNmNGQxYmE0MmZkMTY0YTBkY2Y1MTQiLCJwIjoiaiJ9 )

I’ve created a PR with a fix, but an as yet to be completed test. Inlined from the PR:

This PR is for discussion purposes only. The fix addresses the issue described in my application, but I've not yet been able to get a test configuration to mimic the break.

The issue is that the test code does not lead to the use of a BasicProxyFactoryImpl for the composite unique constraint, whereas in my application this is the case.

Digging through debug stack traces, I suspect this is because in my application Hibernate is representing the constraint in the entityMetamodel as an:

EntityBasedCompositionAttribute : Attribute(name=unique-props, type=component[guid,customer] [non-identifier,composition])
Whereas in my test code it is a:
EntityBasedAssociationAttribute : Attribute(name=discriminator, type=org.hibernate.test.uniqueproperties.UniquePropertiesTest$Discriminator [non-identifier,association])`
Any thoughts on how to change the test configuration to have it exercise a BasicProxyFactoryImpl would be greatly appreciated.

(Note: the commented out test was an initial PoC on test setup - I will clean this up having resolved the above)

I’ll keep plugging away at the test, but any pointers would be received with gratitude!

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

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#100122- sha1:8399ad5 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200330/31c0f28f/attachment.html 


More information about the hibernate-issues mailing list