From: <leg...@at...> - 2003-10-06 08:37:23
|
The following comment has been added to this issue: Author: Andrei Pavlenko Created: Mon, 6 Oct 2003 3:36 AM Body: Still not working. List list = ses.find("from AttributeValue as attributeValue where attributeValue.elementId = ? and attributeValue.attributeId = ?", new Object[]{new Long(9001), new Long(9001)}, new Type[]{Hibernate.LONG, Hibernate.LONG}); --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-374 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-374 Summary: Wrong SQL statement with field "elementId" Type: Bug Status: Unassigned Priority: Blocker Project: Hibernate2 Versions: 2.0.3 Assignee: Reporter: Andrei Pavlenko Created: Wed, 1 Oct 2003 9:32 AM Updated: Wed, 1 Oct 2003 9:36 AM Environment: Sybase Description: I have "composite-id" with two fields. I want to create "many-to-one" reference for field "elementId" but generated by Hibernate SQL query is incorrect. When I change column name to "elementOwnerId" it is generated correctly. See attached files. Wrong SQL: select attribut0_.attributeId as attributeId, attribut0_.elementId as elementId, attribut0_.possibleAttributeValueId as possible3_, attribut0_.attributeValueFreeText as attribut4_, attribut0_.attributeId as attribut1_, attribut0_.elementId as elementId from AttributeValue attribut0_ where (attribut0_.elementId=? )and(attribut0_.attributeId=? ) Error message: Select expression results in more than one column having same name. Column name 'elementId' is specified more than once --------------------------------------------------------------------- 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 |