Jeff,
Am I assuming correctly that if for a given user, that you have a given
person?
If you return a person object and make changes to the person object, you
need to save person before you save user.
So, that would be two saves.
<cfset person.save() />
<cfset appUser.save() />
Teddy
On 11/29/06, Jeff D. Chastain <[EMAIL PROTECTED]> wrote:
What does Reactor key off of to determine if the save method should
trigger an update or an insert query? I have a fairly simple example below,
which I thought would cause two records to be updated. However, a new
record is being created in both tables with each run.
Any suggestions on what I am missing here?
Thanks.
-------------------------------------------------------------------------------------------------------------
<!--- create reactor factory --->
<cfset rf = createObject('component', 'reactor.reactorFactory').init(
expandPath("reactor.xml")) />
<!--- create an appUser record --->
<cfset appUser = rf.createRecord("appUser") />
<cfset appUser.load(appUserID=100012) />
<!--- get the associated person record --->
<cfset person = appUser.getPerson() />
<!--- dump the appUser password--->
<cfoutput>
<p>#appUser.getPassword()#</p>
</cfoutput>
<!--- dump the person id and name --->
<cfoutput>
<p>#person.getPersonID()#<br/>
#person.getNameFirst()#<br/>
#person.getNameLast()#</p>
</cfoutput>
<!--- update the appUser password --->
<cfset appUser.setPassword('test') />
<!--- update the person name --->
<cfset person.setNameFirst('John') />
<!--- save the appUser --->
<cfset appUser.save() />
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
--
<cf_payne />
Adobe Certified ColdFusion MX 7 Developer
Atlanta CFUG (ACFUG): http://www.acfug.org
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --