On 04/07/2008, at 10:30 AM, Jerome Chan wrote:
What about doing
save -> if error check to see if existing record exists and if so
throw up a duplicate error ?
Same race condition applies.
On Jul 4, 2008, at 7:52 AM, Q wrote:
On 04/07/2008, at 2:58 AM, Florijan Stamenkovic wrote:
Hi all,
While reading older discussions on dealing with DB uniqueness
restraints I've found out that the EOGeneralAdaptorException
thrown differs among databases. Is there some generic code that
deals with this in absolute terms ( don't you just *love* the word
absolute being used in conjunction with software :) ? If there is
in WOnder, could someone please be so kind to point me in the
right direction (which part of WOnder) so I can look at it?
Or should I write some pure EOF code like: Fetch -> Check
uniqueness -> Create new record -> Save -> Fetch -> Check, or
something along those lines?
I don't know about you but this just screams race condition to me.
However unlikely it may be to happen trying to do uniqueness
without using an atomic operation is extremely painful to get
right, and difficult to test properly.
This would assume that I know which attributes should be unique in
code, which can be done. I'd rather not deal with this like this,
it seems a nuisance.
Thanks,
Flor
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/qdolan%40gmail.com
This email sent to [EMAIL PROTECTED]
--
Seeya...Q
Quinton Dolan - [EMAIL PROTECTED]
Gold Coast, QLD, Australia (GMT+10)
Ph: +61 419 729 806
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/eviltofu%40mac.com
This email sent to [EMAIL PROTECTED]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/lachlan.deck%40gmail.com
This email sent to [EMAIL PROTECTED]
with regards,
--
Lachlan Deck
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]