add
Insert the given entity into the table and return the affected record number.
If we use an auto-increment key in our table, we need to tell Ktorm which is the primary key by calling Table.primaryKey while registering columns, then this function will obtain the generated key from the database and fill it into the corresponding property after the insertion completes. But this requires us not to set the primary key’s value beforehand, otherwise, if you do that, the given value will be inserted into the database, and no keys generated.
Note that after calling this function, the entity will be ATTACHED to the current database.
Since
2.7