Beginner |
|
Joined: Thu Feb 19, 2009 5:48 am Posts: 37 Location: Glasgow, Scotland
|
Hey guys,
Just new here, I get the feeling I'll be a regular. I'm pretty new to Hibernate. I've looked through the forum and can find nothing like what I'm looking for.
I'm using Maven to construct a Hibernate through Spring to PostGres database. I've been given the database schema and I'm trying to map my domain objects to it and having a little trouble. Just wondering if anyone is able and willing to help me understand Hibernate a little better.
My domain object "Layer" has it's own "Layer" objects but instead of having a FK in the sub layer rows, we have a field in the super layer row which contains a comma separated list of all the names of the sub layers (which also happen to be the primary keys). My understanding of Hibernate isn't the best but I'm struggling to find anything that can handle this elegantly.
I was thinking of a UserType which reads the comma separated list of layers and returns a list of Layer objects but once we are inside the UserType and have extracted the list of layer names, how do we get the information for the sub layers?!?!
Anyone any ideas or am I missing something?
|
|