bug « Criteria « JPA Q&A





1. Why does Hibernate HQL work, but Criteria does not?    stackoverflow.com

I have a simple model which is just a chain of one-to-many relationships: Country -< City -< Street The tables are mapped as entities and are returned as Map. The following test method ...

2. BUG in Criteria and HQL using restriction isNotNull?    forum.hibernate.org

Criteria crit = session.createCriteria(House.class); crit.add(Restrictions.isNotNull("avatar")); Criteria tipoCrit = crit.createCriteria("modality"); tipoCrit.add(Restrictions.eq("typeModality", "Sale")); crit.addOrder(Order.desc("dateInclusion")); List results = crit.list(); return results;

3. DetachedCriteria is not returning expected result (bug?)    forum.hibernate.org

Hello, This is my first post to the forum, so all my appologies if I make any mistake in the form of the post. We are now working with DetachedCriterias to get a list of objects in the database, just like that : Code: DetachedCriteria criteria = DetachedCriteria.forClass(Sample.class) .add(Restrictions.ge("validityDate", new Date())) .add(Restrictions.eq("sampleValidated", true)) .addOrder(Property.forName("sampleValidated").asc()) ...

4. DetachedCriteria's bug?    forum.hibernate.org

/** * Get an executable instance of Criteria, * to actually run the query. */ public Criteria getExecutableCriteria(Session session) { impl.setSession( (SessionImpl) session ); return impl; }

5. Example of criteria bug    forum.hibernate.org