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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

CSVBulkImporter inserting empty relational object with relational callback function


Go to End


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