Joined: Tue Feb 15, 2011 3:18 pm Posts: 2
|
I've searched the internet over and cannot find anyone even asking this question. I assume that I'm just not searching for the right phrase. Others must have had this problem. I am mapping a legacy database that has repeating fields. (below) I'd like to map them as a List of Parts within a List of Segments but can't figure it out. One idea I had was to map the DB fields to object fields directly and then write methods on the object which return the components as a list. However, if NHibernate has builtin support for what I want to do I'd rather use that.
Thanks in advance!
public Class MainObject() { List<Segments> _segments; }
public Class Segment() { List<Part> _parts; }
...other fields... Seg1_Part1_Type Seg1_Part1_Start Seg1_Part1_Length Seg1_Part2_Type Seg1_Part2_Start Seg1_Part2_Length ... Seg2_Part1_Type Seg2_Part1_Literal Seg2_Part1_Start Seg2_Part1_Length Seg2_Part2_Type Seg2_Part2_Literal Seg2_Part2_Start Seg2_Part2_Length ... etc
|
|