Never mind I figured it out in the tql I don't need to specify which
column to join
local.tql="
from
client.AttendeeRoles as t1
join client.Client as t2";
On Fri, Dec 5, 2008 at 12:35 PM, spiraldev <[EMAIL PROTECTED]> wrote:
>
> I am trying to use the onetomany in Transfer but I am not sure I am
> understanding it correctly here is my transfer config.
>
> <object name="Client" table="clients"
> decorator="model.decorators.client">
> <id name="clientID" type="UUID"
> generate="true"/>
> <property name="clientName" type="string"
> column="clientName" />
> <property name="insOn" type="date"
> column="insOn" />
> <property name="insByfk" type="string"
> column="insByfk" />
> <property name="updOn" type="date"
> column="updOn" />
> <property name="updByfk" type="string"
> column="updByfk" />
> <property name="isActive" type="numeric"
> column="isActive" />
> <manytomany name="modules"
> table="ClientModules">
> <link column="clientIDFK"
> to="client.Client"/>
> <link column="moduleIDFK"
> to="lookups.Modules"/>
> <collection type="array">
> <order property="ModuleName"/>
> </collection>
> </manytomany>
> <onetomany name="AttendeeRoles">
> <link to="client.AttendeeRoles"
> column="clientIDFK"/>
> <collection type="array">
> <order property="attendeeRole"
> order="asc"/>
> </collection>
> </onetomany>
>
> </object>
>
> <object name="AttendeeRoles" table="attendeeRoles"
> decorator="model.decorators.AttendeeRoles">
> <id name="attendeeRoleID" type="UUID"
> generate="true" />
> <property name="attendeeRole" type="string"
> column="attendeeRole" /
>>
> <property name="isActive" type="numeric"
> column="isActive" />
> <property name="insByFk" type="string"
> column="insByFk" />
> <property name="insOn" type="date"
> column="insOn" />
> <property name="updByFk" type="string"
> column="updByFk" />
> <property name="updon" type="date"
> column="updon" />
> </object>
>
> but now I can't do this.
>
> local.tql="
> from
> client.AttendeeRoles as t1
> join client.Client as t2
> on t1.clientidfk = t2.clientid";
>
> rc.query = rc.transfer.createQuery(local.tql);
> rc.qAttendeeRoles = rc.transfer.listByQuery(rc.query);
>
> here is the error I am getting
>
> Application Execution Exception
> Error Type: PropertyNotFoundException : [N/A]
> Error Messages: The property that was searched for could not be found
> The property 'clientidfk' could not be found in the object
> 'client.AttendeeRoles'
>
> when I add the clientidfk to the attendeeroles I get this error
>
> Error Type: Database : 42000
> Error Messages: Error Executing Database Query.
> Column 'clientIDFk' specified twice
>
> INSERT INTO attendeeRoles
> (clientIDFK,attendeeRole,isActive,insByFk,insOn,updByFk,updon,clientIDFK,attendeeRoleID)
> VALUES ( (param 1) , (param 2) , (param 3) , (param 4) , (param 5) ,
> (param 6) , (param 7) , (param 8) , (param 9) )
>
> what am I doing wrong.
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer
You received this message because you are subscribed to the Google Groups
"transfer-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/transfer-dev?hl=en
-~----------~----~----~----~------~----~------~--~---