instanceOf places fqdn into resulting query #249

zanfolim opened this Issue Oct 12, 2012 · 1 comment


None yet
2 participants

While trying to restrict the query results by suclasses using instanceOf I got no results. I debugged the hibernate output and notice the query parameter for 'dtype' was replaced by the FQDN instead of the RDN used by hibernate on a single table per hierarchy strategy.

QueryDSL version 2.8
Hibernate version 4.1

I was able to circunvent the issue building the expression myself, as in:

ath baseClassification = Expressions.path(BaseClassification.class,
Path dtype = Expressions.path(String.class, baseClassification, "class");
Expression constant = Expressions.constant(classTarget.getSimpleName());
BooleanExpression predicate = Expressions.predicate(Ops.EQ, dtype, constant);

Although I suppose the following should do it if instanceof was working as expected:
QBaseClassification classification = QBaseClassification.classification;
BooleanExpression predicate = classification.instanceOf(classTarget);

Thanks for the great work - QueryDSL really rocks!


This comment has been minimized.

Show comment
Hide comment

timowest Oct 19, 2012


Released in 2.8.1


timowest commented Oct 19, 2012

Released in 2.8.1

@timowest timowest closed this Oct 19, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment