[hibernate-issues] [Hibernate-JIRA] Created: (HHH-3974) Invalid SQL Generated

andrew inden (JIRA) noreply at atlassian.com
Fri Jun 19 15:23:33 EDT 2009


Invalid SQL Generated
---------------------

                 Key: HHH-3974
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3974
             Project: Hibernate Core
          Issue Type: Bug
          Components: core
         Environment: Hibernate Entity Manager 3.4.0.GA provided by JBOSS 5.0.1GA, MySQL 5.0
            Reporter: andrew inden


SQL generated to load one-to-many is incorrect and throws exception because where clause does not use column alias.

13:42:15,553 INFO  [STDOUT] Hibernate:
    /*
FROM
    com.devj2ee.lt4.service.link.dto.impl.Lt4LinkDto m
where
    m.code = :_code */ select
        lt4linkdto0_.GUID as GUID9_,
        lt4linkdto0_.SEQ_NBR as SEQ2_9_,
        lt4linkdto0_.VERSION_NBR as VERSION3_9_,
        lt4linkdto0_.DATE_ADDED as DATE4_9_,
        lt4linkdto0_.DATE_REMOVED as DATE5_9_,
        lt4linkdto0_.CODE as CODE9_,
        lt4linkdto0_.URL as URL9_
    from
        lt4.link lt4linkdto0_
    where
        lt4linkdto0_.CODE=? limit ?
13:42:15,757 INFO  [STDOUT] Hibernate:
    /* load one-to-many com.devj2ee.lt4.service.link.dto.impl.Lt4LinkDto.analyticEntries */ select
        analyticen0_.LINK_GUID as LINK8_1_,
        analyticen0_.GUID as GUID1_,
        analyticen0_.GUID as GUID9_0_,
        analyticen0_.SEQ_NBR as SEQ2_9_0_,
        analyticen0_.VERSION_NBR as VERSION3_9_0_,
        analyticen0_.DATE_ADDED as DATE4_9_0_,
        analyticen0_.DATE_REMOVED as DATE5_9_0_,
        analyticen0_.CODE as CODE9_0_,
        analyticen0_.URL as URL9_0_
    from
        lt4.link analyticen0_
    where
        analyticen0_.LINK_GUID=?




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