Hi,
I am not very experienced with Hibernate, and I am perplexed by the two usuages listed below:
The first won't return the data for about 10 minutes, while the second returns instantly. Both are using the same object Class JmIm.class, and the underlying table has only 120 rows of data.
Another strange thing is: when I use the first method, the table gets locked and noine can query the table using select * from JmIm table, but can select * from JmIm where jmDesc='someDesc'.
Any input is appreciated.
TIA,
Jeff
1) private List loadLatestJeList(Class claz){ DetachedCriteria crit = DetachedCriteria.forClass(claz); List l = hibernateDaoHelper.findByCriteria(crit);
2) public JmEntity loadExistingJmEntityByDesc(Class claz,String desc){ DetachedCriteria crit = DetachedCriteria.forClass(claz); crit.add(Expression.eq("jeDesc",desc)); List l = hibernateDaoHelper.findByCriteria(crit);
////the hibernateDaoHelper used above: public class HibernateDaoHelper extends HibernateDaoSupport { public List findByCriteria(DetachedCriteria crit) { return getHibernateTemplate().findByCriteria(crit); }
|