Skip to content

Commit

Permalink
fix(adapter): use adapter key when consuming insert returning results
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Nov 26, 2019
1 parent 5e25aa7 commit 24634ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Orm/Adapter/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class Adapter implements AdapterContract {

const result = await query.insert(attributes)
if (modelConstructor.$increments) {
instance.$consumeAdapterResult({ [modelConstructor.$primaryKey]: result[0] })
instance.$consumeAdapterResult({ [modelConstructor.$refs[modelConstructor.$primaryKey]]: result[0] })
}
}

Expand Down

0 comments on commit 24634ae

Please sign in to comment.