Re: Resetting an object back to committed state (including relationships)

2020-11-10 Thread Lon Varscsak
Hmm, so here's the situation I'm seeing. Personalization ->> Image Phase 1: I remove an Image and add new one. Phase 2 (later down the line, but within the same OC): I decide that I don't want to make those changes to the original Personalization, but rather in a new one...so I duplicate the

Re: Resetting an object back to committed state (including relationships)

2020-10-18 Thread Andrus Adamchik
"invalidateObjects" should invalidate relationships too. IIRC this worked exactly as you'd expect in a root context. I don't use nested contexts. Wonder if a bug crept in there? Andrus > On Oct 18, 2020, at 2:53 AM, Lon Varscsak wrote: > > I have a situation where I need to invalidate an

Resetting an object back to committed state (including relationships)

2020-10-17 Thread Lon Varscsak
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