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

Philippe Mouawad (JIRA) noreply at atlassian.com
Thu Nov 29 02:38:57 EST 2007


Documentation of Native SQLQuery contains errors
------------------------------------------------

                 Key: HHH-2976
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2976
             Project: Hibernate3
          Issue Type: Bug
          Components: documentation
    Affects Versions: 3.2.5
         Environment: Hibernate 3.x to 3.2.5
            Reporter: Philippe Mouawad
            Priority: Minor


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