well here I go plugging away at my little app and i encountered
something that is probably just up to me but I figured I would ask
your opinion before proceeding.

I have two objects ObjectA and ObjectB - both have a DAO and a Gateway
object related to various operations involving each object.

Now ObjectA is really a composite object of a bunch of strings,
integers, and a reference to an  ObjectB_ID


When I call the objectB_DAO to delete I figure that is all I should do
there and I shouldn't remove the reference to objectB that exist in
the table that stores data for objectA (since I am technically
spanning multiple rows).

So, I'm debating on where the query should go that deletes the reference.

should it go in objectA_gateway or objectB_gateway?

here would be a more plain spoken example using made up terms.

my first object is Student and my second object is GradeLevel 

Student is a pretty complex object storing a bunch of stuff, including
a GradeLevel (showing if they are a freshman, sophmore, junior, or
senior).  GradeLevel is basically just an id/name pair.

However, the school that these Students attend is being changed from a
four year school to a three year school so the "freshman" GradeLevel
(id=1) has to be deleted.  Before the actual grade level can be
deleted the references to that gradelevel has to be removed from the
studenttable (foriegn key constraints and all that).

Lets pretend for a moment that a student CAN be allowed to not have a
GradeLevel value and so we want to just set the GradeLevelID of all
students with a GradeLevelID of 1 to NULL

now the query for this is pretty easy - but where does the query go:
1. StudentGateway
2. GradeLevelGateway
3. GradeLevelDAO

where would you put it?

Thanks
Bill



-- 
[EMAIL PROTECTED]
http://blog.rawlinson.us

I have 9 gmail invites,want one?
----------------------------------------------------------
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