Hi,
I've a problem of how to define the database-mapping using annotations for the following problem:
@Enitity
class FooBar{
@Id
@GeneratedValue
Long id;
@???? which one here ????
protected Map<Integer, List<FooBar>> childs = new HashMap<Integer, List<FooBar>>();
//....
}
I've worked (to some part) through Bauers "Java Persistence", but the section about Map-mapping (7.2.4) just handles the case of entities being the map-values. If the entities are within a list, the problem is obviously different, but I don't have any clue of how to define the data-base mapping here.
Any ideas? links to additional literature? similar examples?
Thanx in advance, best regards,
Watzlaw
|