Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

instanceOf places fqdn into resulting query #249

zanfolim opened this issue Oct 12, 2012 · 1 comment

instanceOf places fqdn into resulting query #249

zanfolim opened this issue Oct 12, 2012 · 1 comment


Copy link

@zanfolim zanfolim commented Oct 12, 2012

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!

Copy link

@timowest 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
None yet
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants