Skip to content

Hibernate join bug


Google Buzz

Hibernate bug 1895 seems to be still there since 2006.
If, for instance, in Grails, such a syntax won’t work for you (it won’t):

def books = Book.findAll("FROM Book AS b JOIN Chapter AS c WHERE c.active = :isActive")

with a NullPointerException in “HqlSqlWalker.createFromJoinElement” — just use alternative join syntax, via WHERE:

def books = Book.executeQuery("select b FROM Book AS b, Chapter AS c WHERE c.active = :isActive")

Move “WITH” conditions to “WHERE” as needed.

Post a Comment

Your email is never published nor shared.

Powered by WP Hashcash