[hibernate-issues] [Hibernate-JIRA] Resolved: (HHH-2088) TypeMismatchException on object equality expression from one-to-one relationship

Gail Badner (JIRA) noreply at atlassian.com
Mon Mar 29 21:09:31 EDT 2010


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

Gail Badner resolved HHH-2088.
------------------------------

         Assignee: Gail Badner
       Resolution: Fixed
    Fix Version/s: 3.5.0.Next
                   3.3.x

DeleteOneToOneOrphansTest does not exist in Branch_3_3 so I added a test, ASTParserLoadingTest.testEntityAndOneToOneReturnedByQuery().

Fixed in trunk and Branch_3_3.

> TypeMismatchException on object equality expression from one-to-one relationship
> --------------------------------------------------------------------------------
>
>                 Key: HHH-2088
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2088
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.2.0.cr4
>            Reporter: Salvatore Insalaco
>            Assignee: Gail Badner
>             Fix For: 3.3.x, 3.5.0.Next
>
>         Attachments: HHH-2088.patch
>
>
> Suppose to have entity A with a one-to-one constrained relationship to an entity B, called bRel.
> The query: "from A a, B b where a.bRel = b" raises a TypeMismatchException, even if bRel and b are instances of the same entity.
> This happens because in BinaryLogicOperatorNode:
> - lhsType is org.hibernate.type.Type = org.hibernate.type.OneToOneType(B)", with getColumnSpan returning 0.
> - rhsType is org.hibernate.type.Type = org.hibernate.type.ManyToOneType(B)", with getColumnSpan returning 1.
> And it compares the two columnspans.
> It doesn't happen with 3.2.0.cr2.

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