I have two classes:
class A {
private B b;
/* ... */
}
class B开发者_运维问答 {
private String c;
/* ... */
}
Can I create a Hibernate criteria to select all A where b.c = "foo" ?
criteriaForA.createAlias("b", "b").add(Restrictions.eq("b.c", "valueForC");
精彩评论