Hibernate version:
3.0
Mapping documents:
xml-based
I have a class, which contains a String array. I have a table with information on the class which is linked to a table with information on the array by a primary key in the former, and a foreign key in the latter column. I'm (pretty sure) that I should use a one-to-many mapping for this, however I'm also pretty sure that I'll have to encapsulate the String object inside of another object which has an id attribute. All of the examples I have seen on array mapping involve some type of id for each object in the array.
I would like hibernate to track each object in the array based on its index, Is there any other way to do this, or if this is not possible, could someone please tell me it's not?
|