I have two entities: entity A and entity B.
Entity A has entity B as a reference (Ref).
The issue is that when I retrieve entity A I want it to carry over entity B, but when I update entity A, I don't want to update entity B.
Is this even possible with Objectify or do I need to re-design?
unfortunately Java is always pass by reference, means that any Object A = B, than you try to change B, A will change too, the only way to do this is to create new Object A = new Object(); then you copy the contents of Object B to Object A, will be something like this
int someInt = 5;
Object B = new Object(someInt);
where the constructor of class Object taking "someInt" Parameter.
class Object {
int j;
Object(Int i)
{
this.j=i;
}
int getInt()
{
return j;
}
then you create A and equalize the content of A to the Content of B
Object A = new Object(B.getInt());