Hi,
I've never seen an example of using annotation for formula join. There's an example .hbm in hibernate distribution. Does any one know how to write it in hibernate annotation? Thanks.
Master.hbm.xml
Code:
<hibernate-mapping package="org.hibernate.test.formulajoin">
<class name="Master" table="t_masters">
<id name="id">
<generator class="increment"/>
</id>
...
<many-to-one name="detail"
property-ref="currentMaster"
insert="false"
update="false">
<column name="id"/>
<formula>1</formula>
</many-to-one>
</class>
...