I have an unowned relationship in my Domain model
@Entity
public class A {
@Id
private String id;
private Key firstB;
private Key secondB;
// getters & setters
}
@Entity
public class B {
@Id
private Key id;
private String name;
// getter & setter
}
KeyFactory.createKey(B.class.getSimpleName(), name)
is the way I generate the Key for class B
I save B independently from A and assign it to an instance of A some time. The problem is that after saving A both fields firstB and firstA are null.
Any idea of what I'm doing wrong?