Comparing version 1.0.0-rc.2 to 1.0.0-rc.3
@@ -518,6 +518,9 @@ "use strict"; | ||
define(schema) { | ||
return schema.many(this.related); | ||
return schema.many(this.related, this.parent); | ||
} | ||
attach(record, child) { | ||
child.pivot = { user_id: record[this.parentKey], role_id: child[this.relatedKey], ...child.pivot ? child.pivot : {} }; | ||
const pivot = child.pivot ?? {}; | ||
pivot[this.foreignPivotKey] = record[this.parentKey]; | ||
pivot[this.relatedPivotKey] = child[this.relatedKey]; | ||
child.pivot = pivot; | ||
} | ||
@@ -524,0 +527,0 @@ make(elements) { |
{ | ||
"name": "pinia-orm", | ||
"version": "1.0.0-rc.2", | ||
"version": "1.0.0-rc.3", | ||
"description": "The Pinia plugin to enable Object-Relational Mapping access to the Pinia Store.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
774796
22122