Hey all,
I just wanted to tie this email from Pierre Bernard into the whole
awkeFromInsertion() thread, as this can have some quite unexpected
and hard-to-trace impacts for Java Client projects (Mr. Peabody,
please start the WABAC machine...):
-Original Message-
From: Pierre
Thus the correct wa to initialize an attribute in
awakeFromInsertion is:
if (attribute() == null)
setAttribute(myDefaultValue);
Wow, I guess I should have been following this thread closer. I had
figured this out a long time ago, while working with JavaClient, so I
Of what? Not applying default values when the object is not new? Oh,
well... I do.
Cheers, Anjo
Am 11.01.2008 um 08:36 schrieb Mr. Pierre Frisch:
I don't see the advantage
Pierre
--
Pierre Frisch
[EMAIL PROTECTED]
On Jan 10, 2008, at 22:00, Anjo Krank wrote:
Am 11.01.2008 um 01:13
I believe this check in awakeFromInsertion is needed when working with
nested contexts.
I started adding the check when working with JavaClient. The EO would
come from the client - which essentially is a nested context - with
values filled in that you don't want to overwrite on the server
It might also be for java-inheritance logic.
On 11/01/2008, at 10:22 PM, Pierre Bernard wrote:
I believe this check in awakeFromInsertion is needed when working
with nested contexts.
I started adding the check when working with JavaClient. The EO
would come from the client - which
That looks like a bug, the EC should either not be calling
awakeFromInsertion() or should be seeing the notifications from the
change in value. It makes sense to me for it to call
awakeFromInsertion() *BUT* this results in an object state different
from what was there before the changes
Bug report please this needs to be fixed.
Pierre
--
Pierre Frisch
[EMAIL PROTECTED]
On Jan 10, 2008, at 11:04, Chuck Hill wrote:
That looks like a bug, the EC should either not be calling
awakeFromInsertion() or should be seeing the notifications from the
change in value. It makes sense
I will let Peter file the report. But while you are waiting...
What do you think is the correct behavior here? Should it not call
awakeFromInsertion again? Should it call it and undo any changes?
Should it call it and detect that the object has been updated?
Calling revert() should, I
I am not entirely sure of what the behavior should be but after the
save the object is in the DB so this not a newly inserted object
anymore. We do a deleteObject() and a revert() logically we should
call awakeFromFetch() as this would have reverted the object to its
fetched state (last
looks like it's been a while since
i've read any wo tutorials :)
Chuck Hill wrote:
That looks like a bug, the EC should either not be calling
awakeFromInsertion() or should be seeing the notifications from the
change in value. It makes sense to me for it to call
awakeFromInsertion() *BUT*
Hi Pierre,
ID: 5682544
Thanks
Peter
Mr. Pierre Frisch wrote:
Bug report please this needs to be fixed.
Pierre
--
Pierre Frisch
[EMAIL PROTECTED]
On Jan 10, 2008, at 11:04, Chuck Hill wrote:
That looks like a bug, the EC should either
not be calling
That might be from some iServices code that I inherited. I'd always
wondered why they did that. However, looking at the rest of the
code, they might just have been confused. :-)
Chuck
On Jan 10, 2008, at 4:13 PM, Peter Vandoros wrote:
looks like it's been a while since i've read any wo
LOL :-)
Chuck Hill wrote:
That might be from some iServices code that I inherited.
I'd always wondered why they did that. However, looking at the rest of
the code, they might just have been confused. :-)
Chuck
On Jan 10, 2008, at 4:13 PM, Peter Vandoros wrote:
looks like
On Jan 10, 2008, at 12:31 PM, Mr. Pierre Frisch wrote:
I am not entirely sure of what the behavior should be but after the
save the object is in the DB so this not a newly inserted object
anymore.
That is a good point. I'd guess if this is not a simple bug, that
someone was looking as
--
Pierre Frisch
[EMAIL PROTECTED]
On Jan 10, 2008, at 18:37, Chuck Hill wrote:
On Jan 10, 2008, at 12:31 PM, Mr. Pierre Frisch wrote:
I am not entirely sure of what the behavior should be but after the
save the object is in the DB so this not a newly inserted object
anymore.
That is
Hi Chuck,
I am answering my own post.
I think the correct behavior is to call awakeFromInsertion() if we
have an object with EOTemporaryGlobalID and awakeFromFetch() if we
have a regular EOGlobalID.
Pierre
--
Pierre Frisch
[EMAIL PROTECTED]
On Jan 10, 2008, at 19:33, Mr. Pierre Frisch
Mr. Pierre Frisch wrote:
--
Pierre Frisch
[EMAIL PROTECTED]
On Jan 10, 2008, at 18:37, Chuck Hill wrote:
On Jan 10, 2008, at 12:31 PM, Mr. Pierre
Frisch wrote:
I am not entirely sure of what the behavior
should be but after the save the object is in the
On Jan 10, 2008, at 8:04 PM, Mr. Pierre Frisch wrote:
Hi Chuck,
I am answering my own post.
:-)
I think the correct behavior is to call awakeFromInsertion() if we
have an object with EOTemporaryGlobalID and awakeFromFetch() if we
have a regular EOGlobalID.
I am not sure if either
Am 11.01.2008 um 01:13 schrieb Peter Vandoros:
It makes sense to me for it to call awakeFromInsertion() *BUT* this
results in an object state different from what was there before the
changes being reverted. That seems to be a very wrong result.
Which is why in (yawn) Wonder's
I don't see the advantage
Pierre
--
Pierre Frisch
[EMAIL PROTECTED]
On Jan 10, 2008, at 22:00, Anjo Krank wrote:
Am 11.01.2008 um 01:13 schrieb Peter Vandoros:
It makes sense to me for it to call awakeFromInsertion() *BUT*
this results in an object state different from what was there
Hi Peter,
On Jan 8, 2008, at 9:23 PM, Peter Vandoros wrote:
Hi List,
I came across an interesting behaviour today with awakeFromInsertion
() that i did not expect and I hope someone could shed some light.
What happens is that awakeFromInsertion() is not only called when
the EO is created
Hi Chuck,
Chuck Hill wrote:
Hi Peter,
On Jan 8, 2008, at 9:23 PM, Peter Vandoros wrote:
Hi List,
I came across an interesting behaviour today with awakeFromInsertion()
that i did not expect and I hope someone could shed some light.
What happens is that
Hi Peter,
On Jan 9, 2008, at 2:49 PM, Peter Vandoros wrote:
Chuck Hill wrote:
On Jan 8, 2008, at 9:23 PM, Peter Vandoros wrote:
I came across an interesting behaviour today with
awakeFromInsertion() that i did not expect and I hope someone
could shed some light.
What happens is that
Hi Chuck,
Chuck Hill wrote:
Hi Peter,
On Jan 9, 2008, at 2:49 PM, Peter Vandoros wrote:
Chuck Hill wrote:
On Jan 8, 2008, at 9:23 PM, Peter Vandoros wrote:
I came across an interesting behaviour today with awakeFromInsertion()
that i did not expect and I
Hi List,
I came across an interesting behaviour today with awakeFromInsertion()
that i did not expect and I hope someone could shed some light.
What happens is that awakeFromInsertion() is not only called when the EO
is created but also when reverting the editing context after having
25 matches
Mail list logo