Hi,
I am tyring to use QBE.
My class structure is like the one below:
<hibernate-mapping>
<class name="com.rc.pojo.ExoticCurrency"
table="EXOTIC_CCY" schema="DB2ADMIN">
<composite-id name="exoticCurrencyId"
class="com.rc.pojo.ExoticCurrencyId">
<key-property name="countryCode" type="java.lang.String">
<column name="PROC_COUNTRY_CODE" />
</key-property>
<key-property name="exoticCurrency"
type="java.lang.String">
<column name="CCY_CODE" />
</key-property>
</composite-id>
</class>
</hibernate-mapping>
When i use QBE by se
ExoticCurrencyId exoticCurrencyId = new ExoticCurrencyId(originCountry,
currency);
ExoticCurrency exoticCurrency = new ExoticCurrency(exoticCurrencyId);
Example anExample = Example.create(exoticCurrency);
List results = session.createCriteria(ExoticCurrency.class).add(anExample).list();
I noticed that the Where clause is always returned as (1=1) instead of the values that i slotted in the Example argument.
Appreciate any assistance.
Thanks,
Manglu
|