[jbosstools-issues] [JBoss JIRA] (JBIDE-11079) JPA: Hibernate extension mixed up OneToOne and OneToMany mappings

Max Rydahl Andersen (JIRA) jira-events at lists.jboss.org
Tue Feb 28 09:31:36 EST 2012


    [ https://issues.jboss.org/browse/JBIDE-11079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12671597#comment-12671597 ] 

Max Rydahl Andersen commented on JBIDE-11079:
---------------------------------------------

+1 approved for beta1
                
> JPA: Hibernate extension mixed up OneToOne and OneToMany mappings
> -----------------------------------------------------------------
>
>                 Key: JBIDE-11079
>                 URL: https://issues.jboss.org/browse/JBIDE-11079
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: hibernate
>    Affects Versions: 3.3.0.M5
>            Reporter: Dmitry Geraskov
>            Assignee: Dmitry Geraskov
>            Priority: Critical
>             Fix For: 3.3.0.Beta1
>
>         Attachments: definitions_patch.txt
>
>
> When work with OneToOne or OneToMany mappings there are several problems could occur. One of the is described here:
> https://community.jboss.org/message/720006
> Another I faced myself when tried to repruduce the mapping above:
> Caused by: java.lang.IllegalArgumentException: invalid mapping key: oneToOne
> 	at org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaPersistentAttribute.getSpecifiedMappingDefinition(AbstractJavaPersistentAttribute.java:325)
> 	at org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaPersistentAttribute.setMappingKey_(AbstractJavaPersistentAttribute.java:216)
> 	at org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaPersistentAttribute.setMappingKey(AbstractJavaPersistentAttribute.java:195)
> 	at org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaPersistentAttribute.setMappingKey(AbstractJavaPersistentAttribute.java:1)
> 	at org.eclipse.jpt.jpa.ui.internal.details.PersistentAttributeMapAsComposite$1.morphMapping(PersistentAttributeMapAsComposite.java:82)
> 	at org.eclipse.jpt.jpa.ui.internal.details.MapAsComposite.morphMapping(MapAsComposite.java:340)
> 	at org.eclipse.jpt.jpa.ui.internal.details.MapAsComposite$3.execute(MapAsComposite.java:206)
> 	at org.eclipse.jpt.jpa.ui.internal.details.MapAsComposite$3.execute(MapAsComposite.java:1)
> 	at org.eclipse.jpt.common.ui.internal.util.SWTUtil$1.run(SWTUtil.java:138)
> 	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
> 	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
> 	... 23 more
> To reproduce:
> 1. Create classes/mappings from issue above
> 2. Set cursor to PasswordResourceAuditLogEntry#attributes
> 3. Open JPA Details view
> FAILURE: "default(basic)" mapping is used
> 4. Click on the "default(basic)" link
> 5. Select "OneToOne" from the list
> FAILURE: Exception
> The reason is internal hibernate mixed up ManyToOne and OneToOne annotation definitions.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list