[hibernate-issues] [Hibernate-JIRA] Commented: (ANN-611) OneToOne fails to operate internally

nhhockeyplayer (JIRA) noreply at atlassian.com
Wed May 9 13:03:04 EDT 2007


    [ http://opensource.atlassian.com/projects/hibernate/browse/ANN-611?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_26894 ] 

nhhockeyplayer commented on ANN-611:
------------------------------------

Here is a corruption discovery...

Can someone post some feedback for me this time?

Organization--<>--------Director modeled as OneToOne

In debugger breakpoint when decorating OneToOne in the Director class
    readMethod.isAnnotationPresent(javax.persistence.OneToOne.class) == true
    hibernateType instanceof org.hibernate.type.OneToOneType == true

In debugger breakpoint when decorating OneToOne in the Organization class 
(for property director)
    readMethod.isAnnotationPresent(javax.persistence.OneToOne.class) == true
    hibernateType instanceof org.hibernate.type.OneToOneType == false 
????????

hibernateType == org.hibernate.type.ManyToOneType  ?????????

What is going on?


Best regards
Ken in nashua


> OneToOne fails to operate internally
> ------------------------------------
>
>                 Key: ANN-611
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-611
>             Project: Hibernate Annotations
>          Issue Type: Bug
>    Affects Versions: 3.2.1
>         Environment: XP Pro
>            Reporter: nhhockeyplayer
>            Priority: Blocker
>         Attachments: Director.java, Organization.java
>
>
> We use this...
>         <dependency>
>             <groupId>org.hibernate</groupId>
>             <artifactId>hibernate</artifactId>
>             <version>3.2.2.ga</version>
>         </dependency>
>         <dependency>
>             <groupId>org.hibernate</groupId>
>             <artifactId>hibernate-annotations</artifactId>
>             <version>3.2.1.ga</version>
>         </dependency>
> Anyway, when modeling POJO with OneToOne
> Organization--<>---------Director
> internally the mapping types are not what we expect to see.
> OneToOne annotation for Director is mapped properly with OneToOneType
> OneToOne annotation for Organization is mapped with ManyToOneType ?????????????
> I tried all kinds of variations of OneToOne mapping... without relief only to find that JoinTable variation causes both annotations to be ManyToOneType
> What is going on....?
> Can someone advise please?
> We traverse and decorate these annotations and bindings at bootstrap time. Is hibernate going to produce a functional OneToOne?

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