Re: DB uniqueness constraints and dealing with them
Re: DB uniqueness constraints and dealing with them
- Subject: Re: DB uniqueness constraints and dealing with them
- From: Florijan Stamenkovic <email@hidden>
- Date: Thu, 03 Jul 2008 13:11:05 -0400
On Jul 03, 2008, at 12:58, 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?
Ah, looking over this I realize I do not say what I want the generic
code to do... All I want is find out for which key the uniqueness
constraint failed, so I can throw a validation exception.
Or should I write some pure EOF code like: Fetch -> Check
uniqueness -> Create new record -> Save -> Fetch -> Check, or
something along those lines? 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.
F
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden