|
Hi
This seems to be a popular topic. Already
ANN-390
,
ANN-558
,
HHH-4233
,
ANN-615
....
What struck me today is the inconsistency between @OneToOne(mappedBy) and @OneToMany(mappedBy). With Order and SpecialOrder as in the example above (I'm using SINGLE_TABLE @Inheritance for Order):
@Entity
public class Customer {
@OneToOne(mappedBy = "customer") private SpecialOrder specialOrder;
}
@Entity
public class Customer {
@OneToMany(mappedBy = "customer") private Set<SpecialOrder> specialOrders;
}
Why can I reference parent class property in @OneToOne-mappedBy and have the discriminator added to SQL but I cannot do the same on @OneToMany-mappedBy?
|