WIP Bulk create not working.

This commit is contained in:
Naida Vatric
2020-01-21 01:19:35 +01:00
parent 0a181f742f
commit 42eddb3aa5
5 changed files with 46 additions and 7 deletions

View File

@@ -63,7 +63,9 @@ const bulkUpsertRealEstates = async realEstateData => {
"numberOfViewsAgency"
];
const order = [["updatedAt", "desc"]];
//
//console.log("realEstateData:", realEstateData);
//
return await db.RealEstate.bulkCreate(realEstateData, {
updateOnDuplicate: fieldsToUpdateIfDuplicate,
returning: true,