The representation of associations between entities as attributes is one of the most comfortable and popular features of JPA and Hibernate. It makes it very easy to navigate from one entity to one or more related entities in your Java code, like from a Person entity to the corresponding Address entity.
You can also use the relationship attributes in JPQL queries to join entities. The trouble starts as soon as you want to join 2 entities without an association attribute. JPA and Hibernate versions before 5.1 don’t support this kind of joins, and you have to use a workaround to create an implicit cross join. I will show you this in the first part of this video and explain Hibernate’s ad-hoc join feature afterward.
If you like this video, please give it a thumbs up and share it with your friends and co-workers.
Like my channel? Subscribe!
➜ http://bit.ly/2cUsid8
Join the free Member Library:
https://goo.gl/dtyIIC
Read the accompanying post: http://www.thoughts-on-java.org/how-t...
Want to connect with me?
Blog: http://www.thoughts-on-java.org/
Twitter: / thjanssen123
Facebook: / thoughtsonjava
#Java
#Hibernate
#JPA
#JPQL
#Persistence