[
http://opensource.atlassian.com/projects/hibernate/browse/HBX-1082?page=c...
]
Joachim Durchholz commented on HBX-1082:
----------------------------------------
This would be very useful.
I have a company table C with a join to an attribute table A like this:
C.company_id = A.company_id AND 1 = A.tag
I can work around this by using a VIEW like this:
CREATE OR REPLACE A_VIEW
SELECT * FROM A WHERE A.tag = 1
The downside is that Hibernate doesn't identify the primary key in A_VIEW, so I
routinely add <primary-key> tags to the <table> declaration for A_VIEW in
hibernate.reveng.xml.
Since the overhead is not just in initial declaration but also in maintenance, allowing
formulae in hibernate.reveng.xml would reduce my workload a bit.
Creating a formula property when reverse engineering
----------------------------------------------------
Key: HBX-1082
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HBX-1082
Project: Hibernate Tools
Issue Type: Improvement
Components: reverse-engineer
Affects Versions: 3.2.beta11
Environment: All environments
Reporter: Anders Reinhardt Hansen
Priority: Minor
Having lots of formula properties in mapping files is quite frustrating when reverse
engineering database changes.
Therefore it would be a big help if there was a way to write formula properties in the
Hibernate Reverse Engineering files.
A property formula is a property of a mapping file which is calculated by hibernate.
I.e.
<class name="XXX">
<column name="xxx" type="xxx"
formula="(coloumn1+coloumn2)/coloumn3"/>
</class>
the reveng file could look like this
<hibernate-reverse-engineering>
...
<formula name="xxx" type="xxx"
formula="(coloumn1+coloumn2)/coloumn3"/>
</hibernate-reverse-engineering>
Maybe the reverse engineering file is not the correct place for this feature. Suggestions
are welcome
--
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira