hi,
the query over the 1:n relationship 'katergorien'
em.createQuery("select distinct k from KategorieGruppe k " +
"where k.kategorien.bezeichnung like ?1 " +
"order by k.bezeichnung asc");
works perfectly with hibernate 3.2-ga but according to the jpa spec section 4.4.4 it's illegal (and it fails in openJPA).
see also
http://issues.apache.org/jira/browse/OPENJPA-81
jakob
Hibernate version:3.2-ga
Mapping documents:
@OneToMany(cascade = ALL, mappedBy = "kategoriegruppe")
public Collection<Kategorie> getKategorien()
{
return this.kategorien;
}
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs: no exception
Name and version of the database you are using: mysql 5.0.15
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
Problems with Session and transaction handling?
Read this:
http://hibernate.org/42.html