• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Paul Clapham
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • Carey Brown
  • Stephan van Hulst
  • Frits Walraven
  • fred rosenberger
  • salvin francis

heir achy way of representing objects model of same table

Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
this question is about a object model called location where there is root locations and their respective child location mapped accordingly

public List<Location> getAllLocations(@Param("facilityId") String facilityId, @Param("status") Status status);

as you can see from the above java entity

this will get all the respective child location of each root location now the problem is  there is another column called logical_parent_id introduced  to avoid a big work around against the  project level

now i need a qry to use this as heir achy if the column has value else go with existing logic

say here are location level like :-
5.bed space

so these are location_type is there any way to achieve this using JPA or native

You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic