This topic contains 11 replies, has 4 voices, and was last updated by Artem Liubeznyi 7 years, 11 months ago.
- Topic
Hi there.
I’ve set up an import process for a custom entity using a ConfigurableAddOrReplaceStrategy and it imports all my data without issue.
The problems come in the fact that I want to keep my data in sync 1:1 with what exists on the source.
One solution would be to delete everything that’s not present in the source, but I think I’d rather have an ‘active’ flag that I can set for those in the source.
The problem I have is how to perform either of these tasks. The reader can’t pick up lines that aren’t in the source, so I figured it might be worth implementing a second step in the import job that runs before the main import. One that essentially sets all the data to have the active flag set to false, the import will ensure all imported items have it set to true. However it seems quite OTT to write a reader, processor and writer for this process since it’s just reading rows from a database and simply updating them.
So, is this the right approach? And if so, should I define a new instance of Step to do what I want or write the reader/processor/writer combo? Any better way to do it?
Thanks,
Simon
The forum ‘OroPlatform – Programming Questions’ is closed to new topics and replies.