Not too sure what you're talking about here... 

You should probably have a user object that has a contactinfo object inside
of it.  These would be beans... 

When you save the user bean to the database, you would run the validate
method on it first, which would validate all the fields inside user are
correct, and should also call validate on the contactInfo, to make sure that
that's correct.  

Then when you save it to the database, you should save the user to the user
table and then save the contactinfo to the contact info table in the same
transaction (although they can be separate function calls).  

Russ


-----Original Message-----
From: Baz [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 03, 2006 3:37 PM
To: CF-Talk
Subject: Adding Multiple Objects

Hi,

If I had a USER cfc and a CONTACTINFO cfc and no user should exist without
having contact info - whats a good way to add a user to the DB?

Should I call AddUser() which in turn calls AddContactInfo()?

OR, should I call AddContactInfo() first, then take the ContactID and pass
it into AddUser()?

Cheers,
Baz






~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228297
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to