Hi,
I'm using the Criteria API as I have dynamic constraints within my object. But also I need to include a "group by" clause which makes reference to nested properties in my object.
I mean, I have:
Code:
session.createCriteria(Myclass.class).setProjection(Projections.groupProperty("field.subfield.subsubfield"))
so as it can be seen I want to indicate an object within an object within another object. But it doesn't work. I get the following error:
Code:
could not resolve property: subfield.subsubfield
Using HQL I imagine it could be:
Code:
select ...
from Myclass
....
group by field.subfield.subsubfield
But I can't use HQL.
Any ideas?