Does one have to save each individual primitive data member of every nested object?
For example one can have a member variable
Foo myFoo = new Foo();
if Foo has a reference to an instance of class Bar, we must save the individual primitive fields of Bar also?
If my understanding above is correct, this begs the question:
What if there is an array of Foo; each instance will contain a reference to a Bar.
We would have to explicitly set up an id in each Bar and each Foo, to link them.
This is tedious. I wish one could save only the top level reference.