I'm using JPA 2.0 and Hibernate in my project. I have a complex scenario.
Class A and class C correspond to two DB tables and are linked by an 1:N relationship. In the object model, however, between these two classes, there's a third class B that isn't an Entity
(it is an util/helper class) and so this helper class has not a corresponding table in the database.
My object model:
@Entity
public class A {
@Id
... id;
private B b;
}
public class B {
private List<C> c;
}
@Entity
public class C {
...
}
So, I want to know how is it possible to handle such situations?