Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I just want to check how the delete records should work?
I have a structure as follows:
I import sites to my website every month, each area is a different sheet in my excel, so I import one area at a time.
I assumed (possibly wrongly) that if I told it to import sites in area 1, updating existing ones, adding new ones and deleting ones not in the excel that it would only do this for Area 1
Instead it started deleting all the sites out of all my areas.
Is this correct?
If so, is there a way round it so I don't have to manually go in and delete everything first?
This is indeed intended behavior since it deletes all data from the import definition with the same datasourcerelation key in cmsimportrelation table that is not in the current uploaded file.
The datasource relation is based on dataprovider alias and selected primary key name. What you can do is make the primary key name unique for each area so instead of just id make it area1Id, area2Id etc then it should work per area.
Hope this helps,
Thanks for explaining.
I assumed it must be something like that but I didn't really understand.
I shall update my primary keys and try that out.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted