So basically, it is a given that ALL tables with which reactor interacts,
MUST have a primary key defined specifically. (in mssql, "the little yellow
key must appear on at least one field/column in design view!")
Yes?
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Roche
> Sent: Monday, August 07, 2006 3:33 PM
> To: [email protected]
> Subject: RE: [Reactor for CF] Save Problem
>
> Ray,
>
> I had the same problem on a table without a primary
> key. Might be worth checking it.
>
> Kevin
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Behalf Of Ray West
> Sent: 07 August 2006 19:57
> To: [email protected]
> Subject: [Reactor for CF] Save Problem
>
>
> Hi, I am having a similar problem to Tom below. Using
> SQL Server and a numeric Identity column, I can load a
> record, verify that it is loaded correctly, change
> something and save() and it ALWAYS creates a new
> record. Code is below.
>
> In the body section below, the first cfoutput shows the
> correct info, but the second after the save shows a new
> ID that was created by the Identity column in the DB on save().
>
>
> <!--- create the reactorFactory --->
> <cfset Reactor = CreateObject("Component",
> "reactor.reactorFactory").init(expandPath("reactor.xml")) />
> <!--- create a userGateway --->
> <cfset User =
> Reactor.createRecord("Company").load(ID=2) /> <cfset
> User.setDBA("Test DBA") />
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head>
> <meta http-equiv="Content-Type" content="text/html;
> charset=iso-8859-1" /> <title>Untitled Document</title> </head>
>
> <body>
> <!--- dump the results --->
> <cfoutput>#User.getID()# #User.getName()#
> #User.getDBA()#</cfoutput><br /> <cfset User.save() />
> <cfoutput>#User.getID()# #User.getName()#
> #User.getDBA()#</cfoutput> </body> </html>
>
> Any help is appreciated.
>
> Ray
>
>
>
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> -- -- -- -- -- -- -- -
> - --
> Reactor for ColdFusion Mailing List
> [email protected]
> Archives at:
> http://www.mail-archive.com/reactor%40doughughes.net/
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> -- -- -- -- -- -- -- -
> - --
>
>
>
>
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> -- -- -- -- -- -- -- -- -- Reactor for ColdFusion
> Mailing List [email protected] Archives at:
> http://www.mail-archive.com/reactor%40doughughes.net/
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> -- -- -- -- -- -- -- -- --
>
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --