[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-1720) Incorrect Results from multi-valued query containing one-to-one

Mike Ringrose (JIRA) noreply at atlassian.com
Fri Feb 16 14:37:47 EST 2007


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1720?page=all ]

Mike Ringrose updated HHH-1720:
-------------------------------

    Attachment: dotnode_patch.txt

This came up again for the project that I'm working on. The is a small patch that simply checks if a OneToOneType is apart of the select clause and if so, it changes it to a ManyToOneType so that it will load properly

> Incorrect Results from multi-valued query containing one-to-one
> ---------------------------------------------------------------
>
>          Key: HHH-1720
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1720
>      Project: Hibernate3
>         Type: Bug

>   Components: query-hql
>     Versions: 3.1.3
>  Environment: Hibernate 3.1.3, Oracle 10
>     Reporter: Mike Ringrose
>  Attachments: Record.hbm.xml, RecordRegistry.hbm.xml, dotnode_patch.txt
>
>
> The Query below used to work correctly when using the classic query translator; however, no long returns the correct results with the ast query translator. WIth the ast query translator, the third result from the select, which is a one-to-one, always returns null even when the value exists.
> SELECT t.nameFirst, t.nameLast, t.registryRecord FROM Record t WHERE t.recordId = ?").setLong(0, 1);
> Running the query below with the ast query translator, works fine and always returns the correct results, that's why I beleive the problem to be only with multi-valued queries.
> SELECT t.registryRecord FROM Record t WHERE t.recordId = ?").setLong(0, 1);
> The code between session open and close is below:
> return (Object[])session.createQuery("SELECT t.recordId, t.registryRecord FROM com.imsweb.seerdms.shared.entity.Record t WHERE t.recordId = ?").setLong(0, 1).uniqueResult();

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