I have the following mapping file:
Code:
<hibernate-mapping>
<class
name="com.db.siscombe.database.databeans.SiscomCpcv10"
table="SISCOM_CPCV10"
schema="SISCOMBE"
where="FLAG_ESIST = 1"
>
<id
name="idSiscomCpcv10"
type="long"
column="ID_SISCOM_CPCV10"
>
<generator class="sequence">
<param name="sequence">siscom_cpcv10_seq</param>
</generator>
</id>
<property
name="codCpcv10"
type="string"
column="COD_CPCV10"
/>
In this hbm you can see the where condition:
Code:
where="FLAG_ESIST = 1"
If I use a criteria for retrieve this object the where condition works correctly.
But if I use the "get method" of onother object to retrieve the SiscomCpcv10's collection like:
Code:
object.getSiscomCpcv10s()
the where condition do not work correctly.
Question: Is there a way for use hbm's directive in the "get method"?