Let's say for example I have 3 tables. Product,Invoice,ProductInvoice and my reactor.xml looks like this.

        <object name="Customer">
            <hasMany name="Invoice">
                <link name="CustomerInvoice"/>
            </hasMany>
        </object>
       
        <object name="Invoice">
            <hasMany name="Customer">
                <link name="CustomerInvoice"/>
            </hasMany>
        </object>
       
        <object name="CustomerInvoice">
            <hasOne name="customer">
                <relate from="customerId" to="customerId"/>
            </hasOne>
            <hasOne name="Invoice">
                <relate from="invoiceId" to="invoiceId"/>
            </hasOne>
        </object>


If I am in my admin area and viewiing a customers invoices i can loop them using the following query

<cfset customerRecord = application.cs.getBean("CustomerRecord")>
<cfset customer = customerRecord.load(customerId=url.id)>

<cfset invoices = customer.getInvoiceIterator()._getQuery()>

So Up to there works fine, the question I have is, when I am looping the invoices query how do i find the related id's? In the CustomerInvoice table there is customerInvoiceID,customerId,invoiceId, I specifically need the customerInvoiceID each time I pass through the loop.



--
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