O
Omega
I have a problem with Hibernate.
Lets say I have class A, BList and B. They look like this:
class A {
private long id;
private BList list;
get/setXXX();
otherMethods();
}
class BList {
private ArrayList<B> bList;
add/remove/etc.
}
class B {
some private fields;
}
I would like to transfer those classes into database with two relations: As
and Bs, and Bs would have a foreign key to class A. How can I do that using
hibernate? Should I use <nested-composite-element>?
Thanks in advance
Omega
Lets say I have class A, BList and B. They look like this:
class A {
private long id;
private BList list;
get/setXXX();
otherMethods();
}
class BList {
private ArrayList<B> bList;
add/remove/etc.
}
class B {
some private fields;
}
I would like to transfer those classes into database with two relations: As
and Bs, and Bs would have a foreign key to class A. How can I do that using
hibernate? Should I use <nested-composite-element>?
Thanks in advance
Omega