Hibernate Native SQL

vembubalaji
59.1K views

Open Source Your Knowledge, Become a Contributor

Technology knowledge has to be shared and made accessible for free. Join the movement.

Create Content

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.
Open Source Your Knowledge: become a Contributor and help others learn. Create New Content