From: <leg...@at...> - 2003-10-21 10:06:50
|
Message: The following issue has been closed. Resolver: Gavin King Date: Tue, 21 Oct 2003 4:58 AM Ah. Hmmmm unfortunately it is not really possible to fix this elegantly w/o changing the API of ClassPersister. So I'm not going to fix it since (a) it is only a problem on Sybase (b) you can work around it using <key-many-to-one> If this is really a big problem for you, email me. (There -is- an inelegant fix, I think.) --------------------------------------------------------------------- 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: Duplicate column in SQL select clause Type: Bug Status: Closed Priority: Critical Resolution: WON'T FIX Project: Hibernate2 Versions: 2.0.3 Assignee: Gavin King Reporter: Andrei Pavlenko Created: Wed, 1 Oct 2003 9:32 AM Updated: Tue, 21 Oct 2003 4:58 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 |