| Hi Marcio, thanks for your hint. This is an efficient way to treive the desired data in one query. But the question here is whether the provided functionality is according to the JPA specification: is it a bug or not? I am quite sure it is a bug, since the results are not equal depending in which order you execute the query as described above. I would like the hibernate team to check the issue and fix it if they agree with my opinion. Thanks Detlef |