Criteria query filter by object type
I'm using jpa criteria query.
Is it possible to filter an entity by the type of some of it's atributes?
let me explain: I have an entity (let's call it Child) that extends from another entity (let's call it Father).
A third entity Entity1 has an attribute Father (which in some cases could also be Child).
Is there some way t开发者_JAVA百科o retrieve only those Entity1 which Father attribute is a Child?
Thanks!
I've just used a subquery of Child , didn't find a better solution.
精彩评论