Hello,
I'm using Hibernate 3.0 beta2 with hbn-tools.
I'm generating code and i have made very heavy modifications to velocity templates.
I have tables:
A - ID
B - AID, A2ID
B - two columns from B references to same (lookup)table. don't ask why; original database designer fucked things up.
When code is generated in table B, ${pojo.getPropertyName($property)} returns BByAid, and BByA2id.
When code is generated in table A, ${property.getValue().getElement().getReferencedEntityName()} returns B.
My problem is that when code is generated in A, i NEED to know BByAid, and BByA2id!! Maybe i can get them out of a.hbn.xml????
Code:
<set name="BsForA" inverse="true">
<key>
<column name="AID" precision="22" scale="0" />
</key>
<one-to-many class="B" />
</set>