How can I perform an idempotent insert row using subsonic with a SQL 2008 backend?
- by Jason Hernandez
How can I perform an idempotent insert row using subsonic with a SQL 2008 backend?
e.g.
I have a table "Colors" where name is the primary key.
Color c = new Color;
c.name = "red";
c.Save;
Color c2 = new Color;
c2.name = "red";
c2.Save; // throws duplicate key error;
I know I can just trap the error but I would prefer to do something like REPLACE in MySql