Skip to content

Commit

Permalink
refactor(pinia-orm): Add correct operation for insert
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeDredd committed Sep 6, 2023
1 parent 1ac4de0 commit 25090ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/pinia-orm/src/query/Query.ts
Expand Up @@ -805,7 +805,7 @@ export class Query<M extends Model = Model> {
insert(records: Element[]): Collection<M>
insert(record: Element): M
insert (records: Element | Element[]): M | Collection<M> {
const models = this.hydrate(records)
const models = this.hydrate(records, { operation: 'set', action: 'insert' })

this.commit('insert', this.compile(models))

Expand Down

0 comments on commit 25090ec

Please sign in to comment.