[hibernate-issues] [Hibernate-JIRA] Created: (HHH-3915) Missing a table association when using nested criteria

Chris Rose (JIRA) noreply at atlassian.com
Thu May 14 18:42:13 EDT 2009


Missing a table association when using nested criteria
------------------------------------------------------

                 Key: HHH-3915
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3915
             Project: Hibernate Core
          Issue Type: Bug
          Components: query-criteria
    Affects Versions: 3.2.6
         Environment: Oracle 10g, Java 6
            Reporter: Chris Rose
            Priority: Critical
         Attachments: DsmRawDataPropertyValue.hbm.xml, DsmRawDataValue.hbm.xml

I get an invalid query using this criteria:
Criteria crit = session.createCriteria (DsmRawDataPropertyValue.class)
                .createCriteria ("rawData", "rawData")
                .add (Restrictions.eq ("rawData.jobId", rawDataJobId));

Here's the SQL:
Hibernate: 
    select
        this_.raw_data_id as raw1_7_0_,
        this_.property_name as property2_7_0_,
        this_.property_value as property3_7_0_ 
    from
        core360a.dsm_raw_data_property this_ 
    where
        rawdata1_.job_id=?

The mapping files are attached.  Ignore, please, the @___@ schema name; those are swapped out by an interceptor.

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