The google groups model-glue list is a ghost town comparatively to this one, 
and I sorely need someone's advice. 

I have the latest MG:U release downloaded from the web site.
I am using the Transfer ORM adapter.
I have a transfer config for my items as follows, with a many-to-one 
relationship to the auction the item is a part of:

<object name="item" table="Items">
        <id name="Id" type="numeric"/>
        <property name="deleted" type="boolean" column="deleted"/>
        <property name="Title" type="string" column="title"/>
        <property name="Description" type="string" column="Description"/>
        <property name="startDate" type="date" column="startDate"/>
        <property name="endDate" type="date" column="endDate"/>
                  <manytoone name="auction">
                          <link to="auction" column="auctionID"/>
                  </manytoone>
</object>


My model-glue.xml has the following event-handler:

<event-handler name="item.details">
        <broadcasts>
                <message name="modelglue.genericRead">
                        <argument name="Object" value="item" />
                        <argument name="criteria" value="ID" />
                </message>
        </broadcasts>
        <results>
                <result do="view.template" />
        </results>
        <views> 
                <include name="body" template="dspItemDetails.cfm" />
        </views>
</event-handler>

In dspItemDetails, I read the item from the viewstate:
<cfset item = viewState.getValue("itemRecord") />

Then I try and get the associated auction details, like this: <cfdump 
var="#item.getAuction().getTitle()#">.  I get an empty string.  Yet, when I 
dump <cfdump var="#item.getAuction()#">, it appears as if I have an entire 
transfer object of my auction instance.  The column named auctionID is in my 
items table, and refers to the PK 'ID' in my auctions table.  Can a generic 
read not return related items, or am I somehow joining these im-properly? 
Thanks for any advice you can give me, or documentation specific to many-to-one 
relationships using modelglue.genericRead (I find plenty for transfer directly, 
but I really like genericList and genericRead instead!)

Chris Peterson
Gainey IT
Adobe Certified Advanced Coldfusion Developer 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion is delivering applications solutions at at top companies 
around the world in government.  Find out how and where now
http://www.adobe.com/cfusion/showcase/index.cfm?event=finder&productID=1522&loc=en_us

Archive: 
http://www.houseoffusion.com/groups/CF-Community/message.cfm/messageid:239446
Subscription: http://www.houseoffusion.com/groups/CF-Community/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.5

Reply via email to