Skip to content

Commit

Permalink
Update the update function to use primary key
Browse files Browse the repository at this point in the history
  • Loading branch information
schirrel committed Jul 17, 2024
1 parent d4a15f5 commit 7f405bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Repository/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class Repository {
async _create(model) {
try {
let obj = model.createPersistObject();
let toPersist = QueryBuilder.insert(this.tableName, obj);
let toPersist = QueryBuilder.insert(this.tableName, obj, model.primaryKey);
return await this.persist(toPersist);
} catch (err) {
Logger.error(err);
Expand Down

0 comments on commit 7f405bc

Please sign in to comment.