I am desperately trying to solve the following problem:
I have to entities A and B with an OneToOne-relation ship from A to B:
Code:
@Entity
public class A {
...
@OneToOne(...)
private B b;
}
@Entity
public class A {
}
Hibernate will now generate a foreign-key from A (column b_id) to B (referencing the id of B).
Is there anyway to force Hibernate to inverse this relationship (i.e. add column a_id to B). This is (of course) the default behaviour for 1-m-relationships, and I know that due to performance reasons you usually don't use this direction for OneToOne-mappings, but in my case I need the reference the other way around. Is there anyway to solve this problem?
THX VERY MUCH