I have this mapping:
Code:
<class name="classA" table="tableA" lazy="false" schema="A">
<composite-id name="compositeKey"
class="classA$PK">
<key-property name="prop1" column="col1" type="string"/>
<key-property name="prop2" column="col2" type="string"/>
</composite-id>
<property name="prop3" column="col3" type="boolean" not-null="true"/>
</class>
i created a detached criteria for this class like :
Code:
DetachedCriteria crit = DetachedCriteria.forClass(classA);
String name = "test";
crit.add(Restrictions.eq("prop1",name));
List list = getHibernateTemplate().findByCriteria(crit);
giving the error: org.springframework.orm.hibernate3.HibernateQueryException: could not resolve property:
BUTTTTTTT IF I Do:
String name = "test";
crit.add(Restrictions.eq("prop3",new Boolean(true));
returns the proper list of values
I think for the first query the type is not getting resolved correctly,but everything seams fine but could not resolve this issue.every help is highly appriated.
--raju