Resetting an object back to committed state (including relationships)

Lon Varscsak <[email protected]>
Newsgroups gmane.comp.java.cayenne.user
Message-ID <CALAw18zSFFPp9VbqAcFf61shCyR-_qFs_wibUzyEWMWTHvFtYQ@mail.gmail.com>
I have a situation where I need to invalidate an object and have it go
back to it's committed state (whether that's from the db or a parent
context).  If I invalidate the object, it's attributes seem to do what I'm
expecting, but it appears that it leaves relationships alone.  I need a way
to invalidate all of it's relationships, restore those objects back to
their committed state (maybe they've been deleted or modified...as well as
get rid of any newly created objects).  How would I accomplish this?  A
child context doesn't work in my case...because the user has already
"saved" to the parent...it's that a later behavior triggers them to say,
nah, never mind...I want the original object back.

Note: I'm pretty sure in EOF I just called invalidate objects on the main
object and everything else was taken care of...not positive though.

Thanks in advance for the help!

-Lon
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.