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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Customising the CMS /

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

CsvBulkLoader::$duplicateChecks doesn´t work


Go to End


2 Posts   1479 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?