X-CGP-ClamAV-Result: CLEAN X-VirusScanner: Niversoft's CGPClamav Helper v1.22.2a (ClamAV engine v0.102.2) X-Junk-Score: 0 [] X-KAS-Score: 0 [] From: "OCsite" Received: from smtp-beta-1.zoner.com ([217.198.120.66] verified) by post.selbstdenker.com (CommuniGate Pro SMTP 6.3.3) with ESMTPS id 26033524 for webobjects-dev@wocommunity.org; Wed, 16 Jun 2021 22:56:47 +0200 Received-SPF: none receiver=post.selbstdenker.com; client-ip=217.198.120.66; envelope-from=ocs@ocs.cz Received: from smtp.zoner.com (smtp.zoner.com [217.198.120.6]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp-beta-1.zoner.com (Postfix) with ESMTPS id D34E018002F2; Wed, 16 Jun 2021 22:56:27 +0200 (CEST) Received: from smtpclient.apple (smtp2stechovice.cli-eurosignal.cz [77.240.99.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: ocs@ocs.cz) by smtp.zoner.com (Postfix) with ESMTPSA id 82E4C3000077; Wed, 16 Jun 2021 22:56:27 +0200 (CEST) Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_ED660046-30BC-46AF-92E2-2FBC823C34F1" Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.100.0.2.22\)) Date: Wed, 16 Jun 2021 22:56:26 +0200 Subject: =?utf-8?Q?Re=3A_=5BWO-DEV=5D_merging_changes_upon_a_save=3A_what_?= =?utf-8?Q?are_=E2=80=9Clocally_uncommitted_changes=E2=80=9D=2C_too_many_s?= =?utf-8?Q?napshots=3F?= In-Reply-To: To: WebObjects & WOnder Development References: X-Mailer: Apple Mail (2.3654.100.0.2.22) --Apple-Mail=_ED660046-30BC-46AF-92E2-2FBC823C34F1 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 I guess I should dig out my copy of =E2=80=9CPractical WebObjects=E2=80=9D= and check if it was not in there :) Thanks, OC > On 16. 6. 2021, at 21:27, Jesse Tayler = wrote: >=20 > I know at some point in time Chuck Hill documented to the very edge of = the edgiest edge case >=20 > Alas, I=E2=80=99d guess that be lost in a wiki of unknown = whereabouts=E2=80=A6I do not seem to have it myself=E2=80=A6but it = exists... >=20 >> On Jun 16, 2021, at 3:23 PM, OCsite > wrote: >>=20 >> Hi there, >>=20 >> is the process of merging changes upon a save into other ECs, and all = the kinds of snapshots available, documented somewhere in detail? >>=20 >> My old EOEditingContextConcepts says just this: >>=20 >> ... However, locally uncommitted changes to objects in the = EOEditingContext are by default reapplied to the objects, in effect = preserving the uncommitted changes in the object graph. After the = update, the uncommitted changes remain uncommitted, but the committed = snapshots have been updated to reflect the values in the EOObjectStore. >>=20 >> and I can't see what does it actually mean =E2=80=9Clocally = uncommitted changes=E2=80=9D here. Most probably a difference from some = snapshot, but I admit I am sort of lost in the things. >>=20 >> So far I lived in impression that (if we ignore undo) there's only = one kind of snapshots: OSC-level shared snapshots of = what-was-just-saved-into-DB. >>=20 >> I've tried to research the thing a bit and there seem to be at the = very least the following snapshots: >>=20 >> (i) EC.committedSnapshotForObject >> (ii) EC.currentEventSnapshotForObject >> (iii) EODatabaseContext.snapshotForGlobalID >> (iv) EODatabaseContext.localSnapshotForGlobalID >>=20 >> I regret to say the standard documentation does not help much. I did = some testing and it looks like >>=20 >> - (iii) is the one snapshot I knew: whenever save finishes, it always = contains the newly saved values >> - (i) and (ii) =E2=80=94 which for me always contain same data, = that's weird! =E2=80=94 seem to contain an EC-level snapshot stored at = its (first) willChange. Also it looks like those =E2=80=9Clocally = uncommitted changes=E2=80=9D are based on (one of) these. So far though = I haven't found a case when (i) would differ from (ii)... although, = based on the name, I would actually presume (i) should be the same as = (iii). It very definitely is not. >> - (iv) I don't understand at all :( >>=20 >> Are those things somewhere documented in detail? >>=20 >> Thanks and all the best, >> OC >>=20 >=20 --Apple-Mail=_ED660046-30BC-46AF-92E2-2FBC823C34F1 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 I = guess I should dig out my copy of =E2=80=9CPractical WebObjects=E2=80=9D = and check if it was not in there :)

Thanks,
OC

On 16. 6. 2021, at 21:27, Jesse Tayler <webobjects-dev@wocommunity.org> wrote:

I know at some point = in time Chuck Hill documented to the very edge of the edgiest edge = case

Alas, I=E2=80=99d= guess that be lost in a wiki of unknown whereabouts=E2=80=A6I do not = seem to have it myself=E2=80=A6but it exists...

On Jun 16, 2021, at 3:23 PM, OCsite <webobjects-dev@wocommunity.org> wrote:

Hi there,

is the process of merging changes upon a save into other ECs, = and all the kinds of snapshots available, documented somewhere in = detail?

My = old EOEditingContextConcepts says just this:

... However, locally uncommitted changes = to objects in the EOEditingContext are by default reapplied to the = objects, in effect preserving the uncommitted changes in the object = graph. After the update, the uncommitted changes remain uncommitted, but = the committed snapshots have been updated to reflect the values in the = EOObjectStore.

and I can't see what does it actually = mean =E2=80=9Clocally uncommitted changes=E2=80=9D here. Most probably a = difference from some snapshot, but I admit I am sort of lost in the = things.

So = far I lived in impression that (if we ignore undo) there's only one kind = of snapshots: OSC-level shared snapshots of = what-was-just-saved-into-DB.

I've tried to research the thing a bit and there seem to be = at the very least the following snapshots:

(i) = EC.committedSnapshotForObject
(ii) EC.currentEventSnapshotForObject
(iii) EODatabaseContext.snapshotForGlobalID
(iv) EODatabaseContext.localSnapshotForGlobalID

I regret to say the standard = documentation does not help much. I did some testing and it looks = like

- = (iii) is the one snapshot I knew: whenever save finishes, it always = contains the newly saved values
- (i) and (ii) =E2=80=94 which for me always contain same = data, that's weird! =E2=80=94 seem to contain an EC-level snapshot = stored at its (first) willChange. Also it looks like those =E2=80=9Clocall= y uncommitted changes=E2=80=9D are based on (one of) these. So far = though I haven't found a case when (i) would differ from (ii)... = although, based on the name, I would actually presume (i) should be the = same as (iii). It very definitely is not.
- (iv) I don't understand at all = :(

Are = those things somewhere documented in detail?

Thanks and all the best,
OC



= --Apple-Mail=_ED660046-30BC-46AF-92E2-2FBC823C34F1--