Hi Hadf,

This is how I did it. Basically in RDBMS, it has a running thread that
does the cascaded update/delete and so there is an option for you to
tell the RDBMS to do that automatically for you or not.


In GDataStore, it doesn't have such automation. Instead, you have to
retrieve the associated Key, and delete the associated object. You may
think this is manual process by yourself but it is considerably very
quick since Key is all cached in Google, and if you try to find the Key
(even at root Entity Group), it will return you the associated Object
in lightning short period of time, and then you can perform Update or
Delete yourself.


Having such cascade update/delete automation is good except that you
don't have much control where manual gives you full power to control
the flow such as retrieving external information from web services just
right before you do the cascade update.


Syntax wise, you can use the following if you are using Java:

Employee e = pm.getObjectById(Employee.class, k);

k is the Key object. Assuming you put this key onto web, make sure you
use keyToString and stringToKey methods to encode/decode the key before
you store/retrieve the Key.


hope this helps,


Andy

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to