You mean if they are not deleted as well?

As orphans, they probably suffer somewhat, wander around inside the database
looking for another article to take them in. I anticipate that the repeated
rejection that they inevitably experience gets the best of them over time, i
suppose, and they'll probably slink into some dark corner of the comment
table until the very end.

If i wanted to ease their suffering, what i'd do today is a simple

articleDAO.delete(idArticle)
commentDAO.deleteByArticle(idArticle)

As you can see, i've been working too much :). Tight deadlines, as always,
which tend to keep my feet on the ground when i'm building stuff. I'm sure
others might have a more elegant solution, but for now, i'm staying with
simple solutions when i can, and only if i see they don't work or might
break down, i head into something more complex. As i get better at this, the
complex of today will become simple, but as is, i'm finding a lot of
usefulness and power in a loosely coupled model that i can use fluidly. i'm
getting great mileage spending my time thinking about how to use the objects
i have nimbly, rather than taking too much time out front trying to
structure their relationships.

Ok, better get back to the code ... somebody's nagging me about spending too
much time on emails today!

ciao,
Nando


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Patrick McElhaney
Sent: Tuesday, January 11, 2005 8:22 PM
To: [email protected]
Subject: Re: [CFCDev] Newbie approach to Composite Entity pattern.


Here's a question for those of you who think articles and comments
should be dealt with separately. What happens to the comments when an
article is deleted?

--
Patrick McElhaney
704.560.9117
http://pmcelhaney.blogspot.com
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev'
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]



----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]

Reply via email to