Hibernate version:3 rc1
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
<hibernate-mapping>
<class name="vo.as400.CCmpf" table="sdgtwb_dat.arctb00f" lazy="false" where ="cdtbtb in ('CMP')">
<composite-id>
<key-property name="cdc_cmpf" column="cdeltb"/>
</composite-id>
<property name="tpo_tbl" column="CDTBTB" type="string" />
<property name="dsc_cmpf" column="DATITB" type="string" />
</class>
</filter-def>
</hibernate-mapping>
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
<hibernate-mapping>
<class name="vo.as400.ModeVO" table="sdgtwb_dat.arcmo00f" lazy="false">
<composite-id name="modevopk" class="vo.pk.ModeVOPK" >
<key-property name="stagmo" column="stagmo" type="string"/>
<key-property name="modemo" column="modemo" type="string"/>
</composite-id>
<property name="de20mo" column="de20mo" type="string" />
<property name="da30mo" column="da30mo" type="string" />
<many-to-one name="cmpfmo" class="vo.as400.CCmpf" lazy="false" update="false" insert="false">
<column name="cmpfmo"/>
</many-to-one>
</class>
</hibernate-mapping>
Why Hibernate when load association ignore the "where clause on the top of class " vo.as400.CCmp? can you help me please!!!!
It's possible with association in alternative in an association it is possible to pass a value to fixed where?
for example
<many-to-one name="cmpfmo" class="vo.as400.CCmpf" lazy="false" update="false" insert="false">
<column name="cmpfmo"/>
<???>'CMP'<???>
</many-to-one>
Thank's in advance
Devis