Re: Prevent NEW in D2W?
Re: Prevent NEW in D2W?
- Subject: Re: Prevent NEW in D2W?
- From: Chuck Hill <email@hidden>
- Date: Wed, 31 Aug 2011 09:49:40 -0700
On 2011-08-31, at 4:33 AM, David Avendasora wrote:
> But none of this stops you from creating an second instance of the Entity, it just makes it slightly easier to fetch the the right one.
>
> I guess you could possibly do something at the DB level to keep the EO from saving if created. Like a not-null-constrained column that EOF doesn't know about... Then he'd have to catch the Adaptor exception.
Throw an exception from awakeFromInsertion.
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
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