开发者

want to pop out some values from mysql database using hibernate

i have a table that is self joined to itself. i want that when i pop out this table using a self join query it will pop out data till it got null in the matching criteria, and then stops fetching data and return the rows, that are above the null v开发者_Python百科alue.

thanks


I do not think that this is possible.

Because the repeated self join must be represented in the sql statement, but the number of recursions (number of joins in the query) is only known after fetching the data.

So I think you should do it simple and straig forward: Fetching one entity after an other.

(If this causes performance issues, and you have only a few entities in this table at all, you could think of fetching them all with one statement (Select * FROM table)).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜