Estou com dúvida para mapear a seguinte situação com annotations do hibernate 3.2 e java 6
[quote]Tabela A (
id
valor )
Tabela B (
id
a_1_id
a_2_id )
[/quote]
class A {
@Id
@GeneratedValue( strategy = GenerationType.AUTO )
private int id;
private int valor;
@OneToMany( cascade = { CascadeType.ALL } )
@org.hibernate.annotations.Cascade( value = org.hibernate.annotations.CascadeType.DELETE_ORPHAN )
private List<B> bs;
// gets / sets
}
class B {
@Id
@GeneratedValue( strategy = GenerationType.AUTO )
private int id;
@ManyToOne
@JoinColumn( name="a_1_id", nullable = false )
private A a1;
@ManyToOne
@JoinColumn( name="a_2_id", nullable = false )
private A a2;
// gets / sets
}
Quando tento carregar a aplicação ocorre o seguinte erro
Alguém poderia me ajudar?