JPA : Support for packageless entity classes

Bug #634103 reported by Mathias Bogaert on 2010-09-09
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released

Bug Description

Simple query:

HQLQuery query = new JPAQuery(JPA.em());
        QDocumentSet documentSet = QDocumentSet.documentSet; // query type

        documentSets = query.from(documentSet).list(documentSet);

Results in:

Execution exception (In /app/controllers/ around line 27)
NullPointerException occured : null

        at play.mvc.ActionInvoker.invoke(
        at Invocation.HTTP Request(Play!)
Caused by: java.lang.NullPointerException
        at com.mysema.query.hql.HQLSerializer.handleJoinTarget(
        at com.mysema.query.hql.HQLSerializer.serializeSources(
        at com.mysema.query.hql.HQLSerializer.serialize(
        at com.mysema.query.hql.HQLQueryBase.buildQueryString(
        at com.mysema.query.hql.HQLQueryBase.toString(
        at com.mysema.query.hql.jpa.AbstractJPAQuery.createQuery(
        at com.mysema.query.hql.jpa.AbstractJPAQuery.list(
        at controllers.DocumentSets.groupBy(
        at play.mvc.ActionInvoker.invokeControllerMethod(
        at play.mvc.ActionInvoker.invokeControllerMethod(
        at play.mvc.ActionInvoker.invoke(
        ... 1 more

Thanks for the bug report.

The bug resulted from assuming that the handled entity class has a package which it didn't in this case. The HQLSerializer handles now also package-less entity types, although usage of packageless classes is strongly discouraged.

Changed in querydsl:
status: New → Fix Committed
importance: Undecided → Medium
summary: - NullPointer in HQLSerializer
+ JPA : Support for packageless entity classes

Released in 1.9.6

Changed in querydsl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers