[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5853?page=c...
]
Steve Ebersole updated HHH-5853:
--------------------------------
Description: If an entity defines a collection with a property-ref based key as
cacheable, there is a problem loading said collection and putting it into its second level
cache region. The issue appears to be due to the incorrect "key" used to locate
the owning entity; it tries to use the referenced property value instead of the
corresponding id value. (was: See the attached test case for specifics.
Essentially we have an entity which:
# contains a natural-id definition
# contains a collection, whose key is defined using a property-ref
Trying to perform a lookup by natural id triggers the error.
Workarounds include:
# Not doing the natural id lookup, but opt for the pk lookup.
# removing the property-ref, using the PK as the FK target)
Summary: Problem loading cachable collections defined with a property-ref key
(was: Natural id lookups cause problems with loading cached owned collections based on a
property-ref)
Problem loading cachable collections defined with a property-ref key
--------------------------------------------------------------------
Key: HHH-5853
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5853
Project: Hibernate Core
Issue Type: Bug
Components: core
Reporter: Steve Ebersole
Assignee: Steve Ebersole
Fix For: 3.6.1
Attachments: CollectionIssue_TestProgram.zip
If an entity defines a collection with a property-ref based key as cacheable, there is a
problem loading said collection and putting it into its second level cache region. The
issue appears to be due to the incorrect "key" used to locate the owning entity;
it tries to use the referenced property value instead of the corresponding id value.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira