Does DF the "REPLACE" or "INSERT INTO ON DUPLICATE KEY UPDATE" or no?


#1

Hi all.
I didn’t found this issue on the forum, so create a new one.
In MySQL there is features “REPLACE” and
"INSERT INTO table (a,b,c) VALUES (1,2,3) ON DUPLICATE KEY UPDATE"
How can I use this in Dreamfactory?
At this moment if I try to insert a new record in a table with the duplicate fields in a unique index, I got this error - 500 : “Failed to create records in … 1062 Duplicate entry”.
It would be cool if Dreamfactory could update the record with the duplicate fields, instead of an error insertion.


#2

@DamonV This feature is generically referred to as “upsert”, i.e. update if already present, otherwise insert. We actually already have this in our requested list and have slated it for upcoming sprints. Stay tuned for implementation details.