I have run into a issue moving from our existing DOA to hibernate. I have the follow scenario
Class parent {
int parentId
Child childInstance;
}
Class child {
Vector childCollection;
}
The child class is kind of a wrapper for the childCollection. There isn't a table for Child but for childCollection which would be like
create table ChildCollection (autoId int primary key, parentId int foreign key, childValue varchar)
Any idea how the hbm will look like? I have done it where parent class and child class had a one to many relation. but in this case it is the collection within the child. Thanks in advance for your suggestions.
|