How to JOIN unrelated entities with Criteria API

In the comment of the blog below:

@sebersole wrote that the feature is planned for 6.0
I can’t find it in hibernate Jira and in the changelog of the alpha version.
Any updates about this feature? Is it still planned for 6.0? Already implemented?

It’s already implemented.

@beikov Where can I find documentation of this feature? Any chance it will be backported to 5.x?

6.0 is still a work in progress. You will find the documentation for this when we are finished, but we would be happy if you want to contribute that :wink:

The method to create such joins is org.hibernate.query.criteria.JpaRoot#join(java.lang.Class<X>,org.hibernate.query.sqm.tree.SqmJoinType). This will most likely not be backported to 5.5 as that involves a lot of changes.

1 Like