[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-2976) Documentation of Native SQLQuery contains errors

Steve Ebersole (JIRA) noreply at atlassian.com
Tue Jun 23 16:08:39 EDT 2009


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

Steve Ebersole updated HHH-2976:
--------------------------------

    Fix Version/s:     (was: 3.3.2)
                   3.3.x

> Documentation of Native SQLQuery contains errors
> ------------------------------------------------
>
>                 Key: HHH-2976
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2976
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: documentation
>    Affects Versions: 3.2.5
>         Environment: Hibernate 3.x to 3.2.5
>            Reporter: Philippe Mouawad
>            Assignee: Diego Plentz
>            Priority: Minor
>             Fix For: 3.3.x
>
>
> http://www.hibernate.org/hib_docs/reference/en/html/querysql.html
> This code is wrong:
> String sql = "SELECT ID as {c.id}, NAME as {c.name}, " +
>          "BIRTHDATE as {c.birthDate}, MOTHER_ID as {c.mother}, {mother.*} " +
>          "FROM CAT_LOG c, CAT_LOG m WHERE {c.mother} = c.ID";
> List loggedCats = sess.createSQLQuery(sql)
>         .addEntity("cat", Cat.class)
>         .addEntity("mother", Cat.class).list() 
> See:
> HHH-2974

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