From: <leg...@at...> - 2003-08-03 01:25:14
|
Message: The following issue has been closed. Resolver: Gavin King Date: Sat, 2 Aug 2003 8:24 PM implementing this for <joined-subclass>es and <component>s is a bit trickier - if anyone needs this, they can submit it as a new JIRA issue --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-111 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-111 Summary: fields defined as formulas... Type: New Feature Status: Closed Priority: Minor Resolution: FIXED Project: Hibernate2 Components: core Fix Fors: 2.0.2 Versions: 2.0rc2 Assignee: Gavin King Reporter: Fabio Parise Created: Thu, 29 May 2003 4:58 AM Updated: Sat, 2 Aug 2003 8:24 PM Description: Trying to define a computed field (i.e. 'status1000' as the result of the following computation: status+1000; where 'status' is a table column) in this way: <property column="STATUS+1000" length="10" name="status1000" not-null="true" type="java.lang.Long" update="false" insert="false"/> if the first 7 chars of the attribute 'column' contains some non-valid chars for sql aliases, the produced SELECT statement will fail. In the example the alias for the computed field is 'STATUS+16_', which is not a valid sql alias. SELECT WkfPr0_.pkid as pkid, ..., WkfPr0_.STATUS+1000 as STATUS+16_ FROM WKF_PROCESS_CLASS WkfPr0_ WHERE WkfPr0_.pkid=? if the field involved in the formula has a longer name i.e. MYSTATUS --> formula=MYSTATUS+1000, the computed alias is MYSTATU16_, which is a valid alias. --------------------------------------------------------------------- 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 |