Re: Testing if an EO would be deletable
Re: Testing if an EO would be deletable
- Subject: Re: Testing if an EO would be deletable
- From: Paul Hoadley <email@hidden>
- Date: Tue, 19 Jan 2010 20:57:17 +1030
Hi Cheong Hee,
On 19/01/2010, at 8:49 PM, Cheong Hee (Gmail) wrote:
> I relied much on own logic checking than EOF to decide if the object is allowed to be deleted, apart from delete rule. One of the reasons is sometimes the object itself also depends on its attribute value other than delete rule. Is it not better to depend on our own delete logic than EOF? Sooorry for being naive.
No need to apologise. You might be right for your particular circumstance, but I really do have an EO where as far as the business logic is concerned, deletability is fully specified by the delete rules in the model. This won't be the case all the time, as you point out, but it's the case here. I just wondered if calling validateForDelete() and checking for the exception really was the best way to answer the question "Will EOF let me delete this EO if I try?"
--
Paul.
http://logicsquad.net/
_______________________________________________
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