How to use sequence in ID tag of hbm.xml???
<id name=“id” type=“java.lang.Long” column=“ID”>
<generatorclass=“sequence”><paramname=“sequence”>XYZ_TAG_STAFF_SEQ</param></generator>
</id>
Posted by Pankil Patel on September 26, 2011
How to use sequence in ID tag of hbm.xml???
<id name=“id” type=“java.lang.Long” column=“ID”>
<generatorclass=“sequence”><paramname=“sequence”>XYZ_TAG_STAFF_SEQ</param></generator>
</id>
Posted in Hibernate | Leave a Comment »
Posted by Pankil Patel on September 26, 2011
How to call store procedure or package in Hibernate???
Please find attachment for the solution: StoreProcCallWithHibernate
Posted in Hibernate | Leave a Comment »
Posted by Pankil Patel on September 26, 2011
How to use Entity Name, specified in hbm.xml in DetachedCriteria???
OR
How to use OR Restriction in Criteria Query???
DetachedCriteria criteria = DetachedCriteria.forEntityName(“staff_phase2″);
Criterion crit1 = Restrictions.ilike(“lastName”, searchText.trim(), MatchMode.START);
Criterion crit2 = Restrictions.ilike(“firstName”,searchText.trim(), MatchMode.START);
Criterion staffSearchCriterion = Restrictions.or(crit1, crit2);
criteria.add(staffSearchCriterion);
Please find hbm.xml file used for this post, for your refrence: entity-name
Posted in Hibernate | Leave a Comment »
Posted by Pankil Patel on September 26, 2011
How to join parent table to child table using Criteria Query???
Please find attachment for solution:
Posted in Hibernate | Leave a Comment »