Guest User

Untitled

a guest
Jul 20th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. select b.Name, f.Name, r.* from building b
  2. left join floor f on f.BuildingId = b.BuildingId
  3. left join room r on r.FloorId = f.FloorId
  4. where r.AreaId = 5315
  5.  
  6. select distinct b
  7. from Building b
  8. left join fetch b.floors f
  9. left join fetch f.rooms r
  10. where
  11. r.area.areaId = (?)
Add Comment
Please, Sign In to add comment