[hibernate-issues] [Hibernate-JIRA] Closed: (HHH-2711) PropertyAccessException with backref and <composite-map-key/>
Steve Ebersole (JIRA)
noreply at atlassian.com
Tue Jul 31 09:43:11 EDT 2007
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2711?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steve Ebersole closed HHH-2711.
-------------------------------
Resolution: Fixed
> PropertyAccessException with backref and <composite-map-key/>
> -------------------------------------------------------------
>
> Key: HHH-2711
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2711
> Project: Hibernate3
> Issue Type: Bug
> Components: core
> Reporter: Steve Ebersole
> Assignee: Steve Ebersole
> Priority: Minor
> Fix For: 3.2.5, 3.3
>
>
> Background ~~~~~~~~~~~
> Whenever you map a one-to-many association unidirectionally from the many side, with the collection-key (FK) being defined as not-null, Hibernate creates a special property (PropertyAccessor) on the related entity which is used to determine the FK value.
> ~~~~~~~~~~~~~~~~~~~~
> Currently, this causes problems in a few scenarios if that collection is a map and a <composite-map-key/> is used instead of a simple <map-key/>.
> The trivial workaround is to specify that the map keys be nullable.
> The fix is to have Hibernate either:
> 1) not attempt to access component sub-values from when the component instance == BrackrefPropertyAccessor.UNKNOWN;
> 2) have BrackrefPropertyAccessor be more aggressive in terms of trying to resolve the <composite-map-key/> in the first place.
> #1 is definitely the way to go in terms of performance. But it might mean needing to do that check in a few different places...
--
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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list