Hibernate version: 3.1 beta6
The point is as follows:
I have an interface two interfaces IA and IB and implementing classes A and B.
let say
Code:
interface IA{
IB getB();
setB(IB ib);
}
and here comes
@Entity
class A implements IA{
@Id and such...
IB b;
IB getB(){
return this.b;
}
void setB(IB b){
this.b = b;
}
}
And obviosly there is an exception saying that there is no entity of type IB.
The question: How can i explicitly tell Hibernate to use B instead of IB (as far as B implements IB)?
In xml-mapping I use to write
Code:
/**
* @hibernate.many-to-one class="B" cascade="all" constrained="true"
*/
IB getB(){
return this.b;
}
but how to make it using anotations??? I can't find any docs on this...