Also, are you in development mode? If not,
this method may not have been generated.
Doug
From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dan Vega
Sent: Friday, July 07, 2006 1:26
PM
To: [email protected]
Subject: Re: [Reactor for CF] Code
from "Relationships Via Linking Tables" Online Reactor Doc Not
Working
What does your
reactor.xml file look like?
On 7/7/06, Lola Lee
<[EMAIL PROTECTED]> wrote:
Continuing with the Reactor Crash Course in the online doc, I created
three tables - Invoice, Product and InvoiceProduct, and populated these
accordingly. I then tried to run this code:
<!--- create the reactorFactory --->
<cfset Reactor = CreateObject("Component", "
reactor.reactorFactory").init(expandPath("reactor.xml")) />
<!--- create an invoice record --->
<cfset InvoiceRecord =
Reactor.createRecord("Invoice").load(invoiceId=1) />
<!--- output all the products on this invoice --->
<!--- get all of the Invoice Product Records --->
<cfset InvoiceProducts =
InvoiceRecord.getInvoiceProductIterator().getArray() />
<!--- loop over the invoice products and get the product record --->
<cfloop from="1" to="#ArrayLen(InvoiceProducts)#"
index="x">
<cfset ProductRecord = InvoiceProducts[x].getProduct()/>
<cfoutput>
#ProductRecord.getName()#<br>
</cfoutput>
</cfloop>
It fails at the "cfset InvoiceProducts" line with the following
message:
The method 'getInvoiceProductIterator' could not be found in component
/Library/WebServer/Documents/ScratchReactor/Data/Record/InvoiceRecordmysql.cfc.
Check to ensure that the method is defined, and that it is spelled correctly.
The error occurred in /Library/WebServer/Documents/ScratchReactor/CustomerInvoice.cfm:
line 10
8 :
9 : <!--- get all of the Invoice Product Records --->
10 : <cfset InvoiceProducts =
InvoiceRecord.getInvoiceProductIterator().getArray() />
11 :
12 : <!--- loop over the invoice products and get the product record --->
???
--
Dan Vega
[EMAIL PROTECTED]
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
--
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/ -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|