Ok this got way outta hand.  Maybe I shouldn't have framed that example in
that way.  My question came down to this:

If I have an object composed of a collection of other objects (an array of
them) and those composition objects have no existence outside the main
object, should I use the main object's DAO to persist the collection
directly or should those other objects have their own persistence objects
(DAOs)?

The answer I received in the example previously provided was that it was
probably best to have the main object's DAO loop over and call each of the
sub object's DAO individually.


Forgetting all the sidebars of rooms and ballrooms etc,

User loads Hotel object which is composed of floor objects
User makes a change to attributes on floor #5
User saves changes
Application calls application.HotelDAO to persist the hotel
application.HotelDAO loops over the floor objects and identifies if there
was a change, if so it calls application.FloorDAO to persist the change to
that floor.

Everybody ok with that?


Jason Cronk
[EMAIL PROTECTED]





----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

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


Reply via email to