depends on your Transfer configuration but most likely you would do
something like:

<cfset person.setParentOrganization(org) />

where person is your person object and org is your organization
object.  Note that this will only work if you have specified a one to
many in the organization configuration and that you called
organizations "Organization" in your transfer config.

Sean


On Nov 28, 10:14 pm, pedrobl <[email protected]> wrote:
> Hi!
>
> I have an organisation object with two o2m relations person and
> projects. In order to eliminate duplicates, I need to move the related
> persons and projects from one organisation to another.
>
> Is there an easy way to do this with transfer? I use two linking
> tables org_person, and org_project to store the relation between them,
> and also stores other information like the person's role (staff,
> contact, administrator, etc...), or the initial and end date for the
> relation. I'd like to move those relationships unchanged, just to move
> them from organisation A to organisation B.
>
> In SQL this would be trivial to do by just updating the organisation
> FK from organisation A, to organisation B in the org_person table.
>
> I'd like to avoid looping through the org_person structure to modify
> each org_person.OrgId from one organisation to the other, as I'd need
> to create the organisation objects.
>
> Can this be achieved in one shot? Something like:
>
> <cfset org1persons = org1.getPersonsStruct() />
> <cfset org2persons = org2.getPersonsStruct() />
> <cfset StructAppend(org1persons, org2persons, true) />
> <cfset org1.setPersons(org1persons) />
>
> TIA!
>
> Pedro.

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

Reply via email to