I am pretty sure that you still have to make the call. I could be wrong though.

<cfset UserRecord = Reactor.createRecord("tblUser") />
<cfset UserInfoRecord = UserRecord.gettblUserInfo() />

<cfset UserRecord.setUsername("bobo") />
<cfset UserInfoRecord.setFirstname("bobo") />
<cfset UserInfoRecord.setMI("the") />
<cfset UserInfoRecord.setLastname ("clown") />

<cfset USerRecord.save() />
<cfset UserInfo.save()/>

On 9/29/06, Byron Raines < [EMAIL PROTECTED]> wrote:
Hi all I have the following:

In reactor.xml :

        <object name="tblUser">
            <hasOne name="tblUserInfo">
                <relate from="UserID" to="UserID" />
            </hasOne>
        </object>

I do the following to create a new record:

<cfset UserRecord = Reactor.createRecord("tblUser") />
<cfset UserInfoRecord = UserRecord.gettblUserInfo() />

<cfset UserRecord.setUsername("bobo") />
<cfset UserInfoRecord.setFirstname("bobo") />
<cfset UserInfoRecord.setMI("the") />
<cfset UserInfoRecord.setLastname ("clown") />

<cfset USerRecord.save() />

What happens is that the record is inserted into "tblUser", but not in
"tblUserInfo".  Not sure what I'm missing here.  Does it have to do
something with the primary key?

Thanks

byron




-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --




--
Dan Vega
[EMAIL PROTECTED]
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Reply via email to