HQL also defines a WITH
clause to qualify the join conditions. Again, this is specific to HQL; JPQL does not define this feature.
So with that here is the example the Hibernate docs give:One gotcha to lookout for is using the WITH clause with related objects. This example creates an error (although I can't remember what it is):
But you can fix it by doing this:
Here are the Hibernate docs related to the WITH clause
No comments:
Post a Comment