[hibernate-issues] [Hibernate-JIRA] Resolved: (HHH-5940) @MapKeyJoinColumns always throws an exception

Emmanuel Bernard (JIRA) noreply at atlassian.com
Mon Mar 14 14:05:08 EDT 2011


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5940?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Bernard resolved HHH-5940.
-----------------------------------

         Assignee: Emmanuel Bernard
       Resolution: Fixed
    Fix Version/s: 4.0.0.Alpha2
                   3.6.3

Done, thanks.

> @MapKeyJoinColumns always throws an exception
> ---------------------------------------------
>
>                 Key: HHH-5940
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5940
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: annotations
>    Affects Versions: 3.5.6
>            Reporter: Bob Reynolds
>            Assignee: Emmanuel Bernard
>             Fix For: 3.6.3, 4.0.0.Alpha2
>
>
> Using the annotation @MapKeyJoinColumns always throws an exception, which is obvious when you look at AnnotationBinder.java (line 1772 in 3.5.6):
> if ( property.isAnnotationPresent( MapKeyJoinColumns.class ) ) {
> 	stuff...
> 	joinKeyColumns = new JoinColumn[mapKeyJoinColumns.length];
>         stuff...
> 	if ( joinKeyColumns != null ) {
> 		throw new AnnotationException(
> 				"@MapKeyJoinColumn and @MapKeyJoinColumns used on the same property: "
> 						+ BinderHelper.getPath( propertyHolder, inferredData )
> 		);
> 	}
> }
> The problem here is that the if statement is always true because joinKeyColumns was created as non-null above.

-- 
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