[Importer] Only update values that are empty/null
So I am writing a lot of importers and exporters, love the proces. Now i have a bit of a weird problem, I have a table "suppliers" and there I want the following behaviour:
1) Supplier doesnt exist, create new one
2) Supplier does exist: only update values that are missing.
One is easy, but how can I do two? What is the most efficient way to do this? Maybe sth like:
Should be some easier way right?
Solution:Jump to solution
Now did it like this, seems to be working:
```php
protected function beforeFill(): void
{
if(isset($this->record) && $this->record->exists) {...
1 Reply
Solution
Now did it like this, seems to be working: