Mark
On Sat, Jul 12, 2008 at 8:07 AM, Loony2nz <Loon...@gmail.com> wrote:
>
> Hello all..
>
> I think I might have a bad transfer.xml configuration (i
> know..everyone gasp in unison hahaha).
>
> Here is a snippet of my transfer.xml:
>
> <package name="PUBLISHERS">
> <object name="PUBLISHERS" table="PUBLISHERS" >
> <id name="PUBLISHER_ID" type="string" generate="true"/>
> <property name="NAME" type="string" column="NAME"
> nullable="false"/>
>
> <manytomany name="ENDORSEMENTS" table="PUBLISHER_ENDORSEMENTS">
> <link to="PUBLISHERS.PUBLISHERS" column="PUBLISHER_ID"/>
> <link to="ENDORSEMENTS.ENDORSEMENTS" column="ENDORSEMENT_ID"/
>>
> <collection type="array">
> <order property="ENDORSEMENT_ID" order="asc"/>
> </collection>
> </manytomany>
>
> <onetomany name="MARKETPLACE_PUBLISHERS" lazy="true">
> <link to="MARKETPLACE_PUBLISHERS.MARKETPLACE_PUBLISHERS"
> column="PUBLISHER_ID"/>
> <collection type="array">
> <order property="DATE_LAST_UPDATED" order="desc"/>
> </collection>
> </onetomany>
> </object>
> </package>
> <package name="MARKETPLACE_PUBLISHERS">
> <object name="MARKETPLACE_PUBLISHERS" table="MARKETPLACE_PUBLISHERS"
>>
> <compositeid>
> <manytoone name="MARKETPLACES" />
> <manytoone name="PUBLISHERS" />
> </compositeid>
>
> <property name="PUBLISHER_ID" type="string" column="PUBLISHER_ID"
> nullable="false"/>
>
> <manytoone name="MARKETPLACES">
> <link to="MARKETPLACES.MARKETPLACES" column="MARKETPLACE_ID"/>
> </manytoone>
> <manytoone name="PUBLISHERS">
> <link to="PUBLISHERS.PUBLISHERS" column="PUBLISHER_ID"/>
> </manytoone>
> <manytoone name="STATUS_CODES">
> <link to="STATUS_CODES.STATUS_CODES" column="STATUS_CODE_ID"/>
> </manytoone>
> </object>
> </package>
>
> i'm trying to return all the records in marketplace_publishers based
> on a publisher ID.
>
> I've tried this:
> <cfset p =
> transfer.get('PUBLISHERS.PUBLISHERS',arguments.publisher_ID)>
> <cfset qGetAllPermissionsByPublisherID =
> p.GETMARKETPLACE_PUBLISHERSARRAY()>
>
> but I get a "query of query timeout" error with
> p.GETMARKETPLACE_PUBLISHERSARRAY().
>
> I've seen the queries generated in the debug screen and I tried
> running them in TOAD and I have to say, the queries are not returning
> the right data.
>
> Any help with debugging my transfer file?
>
> Thanks!
> >
>
http://docs.transfer-orm.com/wiki/Transfer_Configuration_File.cfm
Looking at your parent composition, the key should start with
'parent', which it does not.
http://docs.transfer-orm.com/wiki/Using_Composite_Keys.cfm#Object_Retrieval
For a parentonetomany composite id element, the key will be 'parent' +
the Object name of the class that is specified. (For example, if you
have a class of 'user.User', the Object name would be 'User'), and the
value is the foreign key that maps to this composite element on the
object.
Mark