On 4/18/06, Doug Hughes <[EMAIL PROTECTED]> wrote:
> I replaced the event model to facilitate cascading saves and basically
> everything that's new with the iterator.

Figured.

> About the user.getAddress().delete()... I suppose it's obvious I know it's
> dangerous if you look at the code.  There's a comment that reads as follows:
>
> <!--- delete the parent.  (By running the next line of code you agree not to
> sue Doug if something goes horribly wrong.) --->
>
> So... yea, dangerous. I do not intend for this to remain as such forever.

OK. Good to know. Right now it would be unusable in most applications,
I believe, since it would cascade *UP* which is definitely not good.
Cascading *down* is fine (as long as there is an option to *not* do
it).

> > // assume parent/foo/bar
> > foo = parent.getFoo();
> > bar = parent.getBar();
> > foo.delete();
> > // parent and foo are deleted, bar is orphaned
>
> Yup.   I'm not stuck on it.  What do you think this should do?

If foo really is a dependent object (i.e., parent requires foo and foo
requires parent), then I think it should be an error to delete foo (or
bar). Deleting parent should delete foo and bar (if casading deletes
is enabled).

I just don't think you should be able to delete from the bottom up.
--
Sean A Corfield -- http://corfield.org/
Got frameworks?

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood



-- Reactor for ColdFusion Mailing List -- [email protected]
-- Archives at http://www.mail-archive.com/reactor%40doughughes.net/


Reply via email to