ERXGenericRecord call didUpdate on insert object
Daniele Corti <[email protected]> Mon, 9 Mar 2015 17:22:39 +0100
| Newsgroups | gmane.comp.web.webobjects.wonder-disc |
|---|---|
| Message-ID | <CAJh8f29zyAwxULcasxrxyjmvNGk-7RQw4PJ3z7s79Q4LosUQgw@mail.gmail.com> |
--===============6347201729583237341==
Content-Type: multipart/alternative; boundary=001a11c26baa9c184f0510dd72b9
--001a11c26baa9c184f0510dd72b9
Content-Type: text/plain; charset=UTF-8
Hi list,
this is a strange thing, IMHO: I'm extending the ERXGenericRecord in order
to perform some logging on Objects changes.
So, I've Overrided,
public void didUpdate() {}
public void didInsert() {}
public void didDelete(EOEditingContext ec) {}
No problem in implementation, but, when I create a new object, I've noticed
that the method didUpdate() is called before didInsert(), so creating an
entry in DB, perform an Update log and a Insert log. However, deleting the
Record does not call the didUpdate method, just the didDelete.
It is supposed to do this? The didUpdate documentation say:
Called on the object after is has successfully been updated in the
database. But the Object is Inserted not Updated, so I don't understand
very well the working of this...
Anyway, if this is the normal behavior in EOGenericRecord lifecycle, is
there a way to notice that the didUpdate method is called on a inserted
object, or another method must be used in order to do this?
Thanks in advance!
Regards,
--
Daniele Corti
--
I DON'T DoubleClick
--001a11c26baa9c184f0510dd72b9
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>Hi list,</div><div>this is a strange thing, IMHO: I&#=
39;m extending the ERXGenericRecord in order to perform some logging on Obj=
ects changes.</div><div><br></div>So, I've Overrided,=C2=A0<div>
<p class=3D""><font face=3D"monospace, monospace"><span class=3D"">public</=
span> <span class=3D"">void</span> didUpdate() {}</font></p><p class=3D"">
</p><p class=3D""><font face=3D"monospace, monospace"><span class=3D"">publ=
ic</span> <span class=3D"">void</span> didInsert() {}</font></p><p class=3D=
"">
</p><p class=3D""><font face=3D"monospace, monospace"><span class=3D"">publ=
ic</span> <span class=3D"">void</span> didDelete(EOEditingContext ec) {}</f=
ont></p></div><div>No problem in implementation, but, when I create a new o=
bject, I've noticed that the method didUpdate() is called before didIns=
ert(), so creating an entry in DB, perform an Update log and a Insert log. =
However, deleting the Record does not call the didUpdate method, just the d=
idDelete.<br></div><div><br></div><div>It is supposed to do this? The didUp=
date documentation say:</div><div>
<p class=3D""><span class=3D"">Called on the object after is has successful=
ly been updated in the database. But the Object is Inserted not Updated, so=
I don't understand very well the working of this...</span></p><p class=
=3D"">Anyway, if this is the normal behavior in EOGenericRecord lifecycle, =
is there a way to notice that the didUpdate method is called on a inserted =
object, or another method must be used in order to do this?</p></div><div>T=
hanks in advance!</div><div><br></div><div>Regards,</div>-- <br><div class=
=3D"gmail_signature">Daniele Corti<br>--<br>I DON'T DoubleClick<br></di=
v>
</div>
--001a11c26baa9c184f0510dd72b9--
--===============6347201729583237341==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
--===============6347201729583237341==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Wonder-disc mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wonder-disc
--===============6347201729583237341==--