From: <leg...@at...> - 2003-07-30 09:05:22
|
The following comment has been added to this issue: Author: Gavin King Created: Wed, 30 Jul 2003 4:04 AM Body: This is now implemented for properties of <class> or <subclass>; not for properties of <component>s, nor for properties in a <joined-subclass> heirarchy. --------------------------------------------------------------------- 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: In Progress Priority: Minor Project: Hibernate2 Components: core Versions: 2.0rc2 Assignee: Gavin King Reporter: Fabio Parise Created: Thu, 29 May 2003 4:58 AM Updated: Wed, 30 Jul 2003 4:02 AM 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 |