Hibernate バージョン 4.2 を使用しています
私は2つのエンティティを持っています。
@Entity
public class A {
Long Id;
@ManyToOne
B b;
}
@Entity
public class B {
Long Id;
//There is no relation back here with any annotations to A, and can't add a @OneToMany
}
このような結果を得るために Hibernate Criteria を使用してクエリを実行することは可能ですか?
List<Map<B,List<A>>>
? 結合か選択かは関係ありません。
私が結果に望むものの例:
A.id B.id
1 1,2,3,4
2
3 5
4 7
5
//トリンド