Inserts the specified entity into the database table, automatically generating the primary key value and replacing the existing row.
- Parameters
-
| entity | The entity to be inserted. |
- Returns
- The generated row ID of the inserted entity.
- Exceptions
-
This method is similar to the AutoIncInsert() method, except that it replaces the existing row if an unique constraint violation occurs.
- Note
- This method is only available if the entity type has an auto-incremented primary key. Use the SQT_PRIMARY_KEY_AUTO_INC macro to define an auto-incremented primary key.
- See also
- sqt::DataContext<>::AutoIncInsert()
-
sqt::DataContext<>::MakeAutoIncReplacer()
-
SQT_PRIMARY_KEY_AUTO_INC