Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

CSVBulkImporter inserting empty relational object with relational callback function


Reply


349 Views

Avatar
r0nn1ef

Community Member, 6 Posts

7 January 2013 at 8:14am

I've written three or four DataObject models as well as using the ModelAdmin and CSVBulkImporter to import data for my new models. I've seem to run across and issue that doesn't make any sense to me.

One of the csv files being imported contains 32K(+/-) records and when I import the file, one of my relational mappers always inserts a new record for the relation with no values; the relational mapper isn't finding the existing relational record. BUT, however, if I reduce the number of records in the csv file (i trimmed it down to 1000 records plus the header row), it works just fine.

I looked at the code in the CSVBulkLoader class and the code makes sense and should work fine (as is proven in my reduced row count in the import). Is there something I'm missing, don't know, or don't understand about how the bulk loader process works that would cause this? Or is it a database error of some sort?