Hi,

Just to add to this, I can also confirm that this is true with Cf8 (on OS X) and MySQL 5. I came across this recently and I was in a rush so I just added the extra lines to load, then delete the record.

Not sure why it changes the id value to 0.

Cheers,

Dave

On Tue, 4 Dec 2007 18:00:06 -0500
 "Marc" <[EMAIL PROTECTED]> wrote:
Per the URL:

http://livedocs.reactorframework.com/Reactor_Documentation.htm#Delete_a_Reco
rd.htm

The Reactor documentation says that this syntax is valid:

<cfset recordToKill =
Reactor.createRecord("MyRecord").delete(recordId=attributes.recordId) />

However, this syntax does not work for me, with CF8 and SQL 2005 enterprise. The debug code in CF8 always shows the userId is 0 in the generated query, even though I have verified that attributes.recordId is set to the proper
value before the call.

The following replacement code DOES work, however:

<cfset recordToKill = Reactor.createRecord("MyRecord") />
<cfset recordToKill.setRecordId(attributes.recordId) />
<cfset recordToKill.delete() />

What could I be doing wrong? I'd rather not take three lines of code to do
what can and should be done with one.

Marc





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



_______________________________________________________________________
David Phipps
Director, Chapel Studios

T +44 (0)20 7100 6980   F +44 (0)20 7100 6981   M +44 (0)7765 240899
New Broad Street House, 35 New Broad Street, London, EC2M 1NH, UK

http://www.chapel-studios.co.uk
_______________________________________________________________________

The Chapel Studios group of companies are registered in England. 'Chapel Studios' and the Chapel Studios logo are registered trademarks of Chapel Studios. The information in this email is confidential, intended solely for the addressee, and may be legally privileged. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose or take any action based upon this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail.


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

Reply via email to