开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜