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.

Customising the CMS /

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

CsvBulkLoader::$duplicateChecks doesn´t work


Go to End


2 Posts   1671 Views

Avatar
baba-papa

Community Member, 279 Posts

15 September 2009 at 3:56am

Hi,

I extended the CsvBulkLoader and don´t want duplicates in my database.

    public $duplicateChecks = array(
        'Studioname' => 'name'
    );

The values of the CSV column Studioname should be compared with the connected objects attribute "name". If I import the same CSV file twice all data sets will be doubled. I want existing data sets to be overwritten.

Any help to this issue is appreciated.

Avatar
baba-papa

Community Member, 279 Posts

15 September 2009 at 7:43pm

Does duplicateChecks work only with a primary key?