I have a question.
I have class A:
public class A {
mapped id
mapped name
}
and class B:
public class B {
mapped @OneToMany List<A>
mapped name
}
How can I create criteria, that is created on class "A", and get their associated class "B"?
For posterity:
public class A {
mapped id
mapped name
@ManyToOne B b;
}
public class B {
mapped @OneToMany(mappedBy="b") List<A>
mapped name
}
There is another solution with HQL, but i don't want to use it;