Hi,

I am running into a strange problem on my app - FB5/Reactor/ColdSpring.

I am trying to save a paymentid and comments into an order table. I have the following in my reactor config:

<object name="order">
        <hasOne name="orderpayment">
                <relate from="paymentid" to="paymentid" />
        </hasOne>
</object>
<object name="orderpayment" />

I then have an OrderService component which is called from FB via ColdSpring and I have the following method in this component:

<cffunction name="savePaymentToOrder" access="public" returntype="void">
<cfargument name="orderid" type="numeric" required="true" default="0" />
<cfargument name="paymentid" type="numeric" required="true" default="0" />
<cfargument name="comments" type="string" required="false" default="" />
<cfset tmp = getOrderByID(orderid=arguments.orderid) />
<cfset tmp.setcomments(trim(arguments.comments)) />
<cfset tmp.setpaymentid(arguments.paymentid) />
<cfset tmp.save() />
</cffunction>

the getOrder() and getOrderByID() methods used in the above:
<cffunction name="getOrder" access="public" returntype="any">
        <cfreturn getReactorFactory().createRecord('order') />
</cffunction>
        
<cffunction name="getOrderByID" access="public" returntype="any">
        <cfargument name="orderid" type="numeric" required="true" />
        <cfset var orderRecord = getOrder() />
        <cfset orderRecord.load(orderid=arguments.orderid) />
        <cfreturn orderRecord />
</cffunction>

When I run the fbapp which calls savePaymentToOrder(orderid=attributes.orderid,paymentid=paymentid,comments=attributes.tokens.Status)

I get the following error:

The method setcomments was not found in component /Applications/ColdFusion8/wwwroot/store/com/Record/orderpaymentRecordmysql.cfc.

but this line is highlighted:

<cfset tmp.setpaymentid(arguments.paymentid) />

I have tried deleting the orderRecord from the reactor project. Restarting cf, re-initing the app. I then swapped these two lines:

<cfset tmp.setpaymentid(arguments.paymentid) />
<cfset tmp.setcomments(trim(arguments.comments)) />

I get the same error but with tmp.setcomments highlighted?      

Everything is in development mode.

If I strip out the code and put it into a .cfm file and run it with some static data then everything works.

Has anyone seen this before? Reactor seems to be looking in orderpaymentRecord but I am not setting this anywhere? When I look at orderRecord the setcomments method is as plain as day.

Can I delete everything in the reactor/project folder?

Cheers,

Dave

--
    _______________________________________________________________________
    David Phipps, Director
    [EMAIL PROTECTED]

    Chapel Studios / London
    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

    Visit our website: http://www.chapel-studios.co.uk
    _______________________________________________________________________

    Chapel Studios is a limited company registered in England. 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