Back
Close

Hibernate Native SQL

vembubalaji
59.5K views

Native Joins

  • If we would like to get data from both User and team based on the user table, we can use native joins. In this case, we are using the left outer join
A quick sample. Check out the JAVA class and SQL file
  • Notice that the returned Object List are the columns requested.
  • To ensure eager loading of associated tables we can use addJoin and addEntity.
Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.
Go to tech.io