UPSERT for touch table


I have a file I need to import in which the key I want to use in my collector is repeated pver multiple rows. As such I just want one entry into the touch table for each such key.

if I do $this->addMainTouchable(SomeConfig::RESOURCE_TYPE_SOME, $entity->getSomeKey()), I have the problem that since $entity->getSomeKey() is not unique since it is repeated on multiple rows in my import CSV.

So basically what I need is an UPSERT into the touch table, ie. either insert or if an entry exists already, then it should update the timestamp (or maybe do nothing).


ok … nevermind … it seems like it does an upsert by default and my issue was that $entity->getSomeKey() was not a proper integer (ie. had leading zeros).


Hi Lukas,

Is the issue still open? Thanks.



nope … closed. thx!