I was just wondering if this support is in hibernate annotations yet ?
I can't seem to find it ...
I have a working version with xml mapping files that contain this :
Code:
<many-to-one name="opsmode"
class="com.watchtalk.web.businessobject.OperationalMode"
update="false" insert="false">
<column name="OPSMODE" length="2" />
<formula>'OPSMODE'</formula>
<formula>'0'</formula>
</many-to-one>
That works fine.
Now is there a way to get the same bahviour with annotations ?
Something like :
Code:
@ManyToOne
@JoinColumns (
{
@JoinColumn ( formula="SUBSTR(APPLMODID, 0, 2)", referencedColumnName = "TYPE" )
,@JoinColumn ( formula="SUBSTR(APPLMODID, 2, 4)", referencedColumnName = "NAME" )
,@JoinColumn ( name="message" , referencedColumnName = "messageid" )
}
)
public Logmessage getMessage() {
return message;
}
Is this supported yet ?