From: <leg...@at...> - 2003-09-02 04:59:28
|
The following comment has been added to this issue: Author: David Channon Created: Mon, 1 Sep 2003 11:59 PM Body: This is a user issue not a hibernate bug. Following is the supplied query. It is missing the closing parenthesis to close the new in the select clause. It did involve a joined subclass so I loaded the mappings and created the classes anyway and the query worked fine. String select = new String("select distinct new SuchErgebnisInteressenten(interessent.oid, "+ "interessent.name1, interessent.name2, interessent.geburtsdatum, adresse.strasse, adresse.plz, "+ "adresse.ort, adresse.telefonp "); String alias = new String("from Interessent interessent "+ "left outer join interessent.adresseSet adresse "); Query query = sess.createQuery(select + alias); List ergebnis = query.list(); --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-300 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-300 Summary: select new Foo(...) does not work (was ok in 2.0.1) Type: Bug Status: In Progress Priority: Major Project: Hibernate2 Components: core Versions: 2.0.2 2.0.3 2.1 beta 1 2.1 beta 2 Assignee: David Channon Reporter: Thilo Jahke Created: Fri, 29 Aug 2003 8:28 AM Updated: Mon, 1 Sep 2003 1:20 AM Description: The simple HQL Query select new Foo(i.name, a.street, ...) from person i left outer join address a ... did work fine in Hibernate 2.0.1 but not in the newer versions. I get the error net.sf.hibernate.QueryException: undefined alias: i Thilo --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |