transfer.xml excerpt:
<object name="invoice" table="tblInvoices">
<id name="invoiceId" type="numeric" />
<property name="invoiceNum" type="numeric" />
<property name="invoiceDate" type="date" />
<onetomany name="invoiceItem" lazy="true" proxied="true">
<link to="invoiceItem" column="fk_invoiceId" />
<collection type="array" />
</onetomany>
</object>
<object name="invoiceItem" table="tblInvoiceItems">
<id name="invoiceItemId" type="numeric" />
<property name="itemDesc" type="string" />
<property name="itemCost" type="numeric" />
</object>
I'm then looping through a CSV file that contains a line of
"invoiceNum,invoiceDate,itemDesc,itemCost"
read-in-csv
loop-start
attempt to get invoice object
if not persisted
set invoiceDate
save invoice object
end if
new invoiceItem object
set itemDesc
set itemCost
set parentInvoice to invoice
save invoiceItem
loop-end
For ~500 invoiceItems, this does not complete in under 15 minutes.
If I however, remove the o2m relationship in the invoice object and
add the fk_invoiceId as a property to invoiceItem, it takes only a
couple minutes.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---