Hibernate Books

All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Join unrelated entities using Criteria Queries
PostPosted: Sat Nov 18, 2017 2:45 pm 
Newbie

Joined: Fri Aug 04, 2017 4:23 am
Posts: 2
Hello, with the latest version of Hibernate is possible to join two entities even if they are not related by a relationship.
Is it possible to do the same using Criteria Queries ?


Top
 Profile  
 
 Post subject: Re: Join unrelated entities using Criteria Queries
PostPosted: Sat Nov 18, 2017 3:47 pm 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1590
Location: Romania
Yes, it is possible. Read this article for more details.

The syntax is only supported in JPQL, not in Criteria API or the legacy one.

_________________
If you liked my answer, you are going to love my High-Performance Java Persistence book and my blog as well.


Top
 Profile  
 
 Post subject: Re: Join unrelated entities using Criteria Queries
PostPosted: Wed Nov 22, 2017 6:41 am 
Beginner
Beginner

Joined: Sat May 21, 2011 7:40 am
Posts: 22
If you are looking for a query builder API that supports this feature, maybe give Blaze-Persistence a try. It offers an API to do that.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.