Try our conversational search powered by Generative AI!

Object graphs in the dynamic datastore

Vote:
 

I have a quick question about designing an object graph which will be saved within the dynamic data store.

For simplicity imagine i have two classes one of which references the other.

My first question is this: If i wanted to store two objects (one of each type) could i simply store the first and the DDS will traverse the graph and store the second?

And secondly: If i wanted to retrieve the second classes make a change and persist that, would i need to retrieve the first (shich will contain the second) make my change and persist the first back again? or could i directly retrieve the second and persist it back without knowing anything about the first?

Could i achieve this by simply inheriting both classes from IDynamicData so that the second objects can be persisted as if independent of the first?

 

Basically if your graph was quite large it would become quite cumbersome to retrieve the root and then traverse it, update the desired object and re-persist the root object.

 

Hope that makes sense

Adam

#47112
Jan 14, 2011 13:03
Vote:
 

The short answer is yes DDS will save your whole graph automatically and you can load a sub object directly (you need to load it through the correct store though). 

#47117
Jan 14, 2011 13:20
Vote:
 

Excellent. Thanks for the short and speedy response!

#47118
Jan 14, 2011 13:33
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.