I have a few simple entities that are stored in a simple "code" table with the following structure (all stored as character fields):
code_fieldname pk
code_value pk
code_comment
code_field1
code_field2
One object I am trying to map has data stored in this table of the following form
code_fieldname = "segment"
class = Segment
segment.id = code_value
segment.name = code_comment
segment.markup = code_field1 (decimal property)
So the segment records all have a "code_fieldname" = "segment" with their ID being the value of "code_value".
What is the mapping for such a structure? I am using XML based mapping.