Fix insert calling wrong function (#17856)
The `insert` method is calling `tryInsertID`, which ignores the `pkName` parameter. Calling `tryInsert` instead should be correct.
This commit is contained in:
parent
198b5e3a7a
commit
5439cfc317
1 changed files with 1 additions and 1 deletions
|
|
@ -524,7 +524,7 @@ proc insert*(db: DbConn, query: SqlQuery, pkName: string,
|
|||
{.tags: [WriteDbEffect], since: (1, 3).} =
|
||||
## executes the query (typically "INSERT") and returns the
|
||||
## generated ID
|
||||
result = tryInsertID(db, query, args)
|
||||
result = tryInsert(db, query, pkName, args)
|
||||
if result < 0: dbError(db)
|
||||
|
||||
proc execAffectedRows*(db: DbConn, query: SqlQuery,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue