pinia-orm-edge 1.10.0-28686653.93359fd → 1.10.0-28691799.920f43b

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/casts.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { a0 as CastAttribute, m as ModelFields } from './shared/pinia-orm.89228fae.cjs';
1
+ import { a0 as CastAttribute, m as ModelFields } from './shared/pinia-orm.67fc2547.cjs';
2
2
  import 'pinia';
3
3
  import '@/composables';
4
4
  import '@pinia-orm/normalizr';
package/dist/casts.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { a0 as CastAttribute, m as ModelFields } from './shared/pinia-orm.89228fae.mjs';
1
+ import { a0 as CastAttribute, m as ModelFields } from './shared/pinia-orm.67fc2547.mjs';
2
2
  import 'pinia';
3
3
  import '@/composables';
4
4
  import '@pinia-orm/normalizr';
package/dist/casts.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { a0 as CastAttribute, m as ModelFields } from './shared/pinia-orm.89228fae.js';
1
+ import { a0 as CastAttribute, m as ModelFields } from './shared/pinia-orm.67fc2547.js';
2
2
  import 'pinia';
3
3
  import '@/composables';
4
4
  import '@pinia-orm/normalizr';
@@ -1,5 +1,5 @@
1
- import { a1 as TypeDefault, an as PropertyDecorator, ao as TypeOptions, ap as UidOptions, M as Model, s as PrimaryKey, H as deleteModes, a0 as CastAttribute, aj as Mutator } from './shared/pinia-orm.89228fae.cjs';
2
- export { aq as NanoidOptions } from './shared/pinia-orm.89228fae.cjs';
1
+ import { a1 as TypeDefault, an as PropertyDecorator, ao as TypeOptions, ap as UidOptions, M as Model, s as PrimaryKey, H as deleteModes, a0 as CastAttribute, aj as Mutator } from './shared/pinia-orm.67fc2547.cjs';
2
+ export { aq as NanoidOptions } from './shared/pinia-orm.67fc2547.cjs';
3
3
  import 'pinia';
4
4
  import '@/composables';
5
5
  import '@pinia-orm/normalizr';
@@ -1,5 +1,5 @@
1
- import { a1 as TypeDefault, an as PropertyDecorator, ao as TypeOptions, ap as UidOptions, M as Model, s as PrimaryKey, H as deleteModes, a0 as CastAttribute, aj as Mutator } from './shared/pinia-orm.89228fae.mjs';
2
- export { aq as NanoidOptions } from './shared/pinia-orm.89228fae.mjs';
1
+ import { a1 as TypeDefault, an as PropertyDecorator, ao as TypeOptions, ap as UidOptions, M as Model, s as PrimaryKey, H as deleteModes, a0 as CastAttribute, aj as Mutator } from './shared/pinia-orm.67fc2547.mjs';
2
+ export { aq as NanoidOptions } from './shared/pinia-orm.67fc2547.mjs';
3
3
  import 'pinia';
4
4
  import '@/composables';
5
5
  import '@pinia-orm/normalizr';
@@ -1,5 +1,5 @@
1
- import { a1 as TypeDefault, an as PropertyDecorator, ao as TypeOptions, ap as UidOptions, M as Model, s as PrimaryKey, H as deleteModes, a0 as CastAttribute, aj as Mutator } from './shared/pinia-orm.89228fae.js';
2
- export { aq as NanoidOptions } from './shared/pinia-orm.89228fae.js';
1
+ import { a1 as TypeDefault, an as PropertyDecorator, ao as TypeOptions, ap as UidOptions, M as Model, s as PrimaryKey, H as deleteModes, a0 as CastAttribute, aj as Mutator } from './shared/pinia-orm.67fc2547.js';
2
+ export { aq as NanoidOptions } from './shared/pinia-orm.67fc2547.js';
3
3
  import 'pinia';
4
4
  import '@/composables';
5
5
  import '@pinia-orm/normalizr';
@@ -1,4 +1,4 @@
1
- import { M as Model, b as Collection } from './shared/pinia-orm.89228fae.cjs';
1
+ import { M as Model, b as Collection } from './shared/pinia-orm.67fc2547.cjs';
2
2
  import 'pinia';
3
3
  import '@/composables';
4
4
  import '@pinia-orm/normalizr';
@@ -1,4 +1,4 @@
1
- import { M as Model, b as Collection } from './shared/pinia-orm.89228fae.mjs';
1
+ import { M as Model, b as Collection } from './shared/pinia-orm.67fc2547.mjs';
2
2
  import 'pinia';
3
3
  import '@/composables';
4
4
  import '@pinia-orm/normalizr';
package/dist/helpers.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { M as Model, b as Collection } from './shared/pinia-orm.89228fae.js';
1
+ import { M as Model, b as Collection } from './shared/pinia-orm.67fc2547.js';
2
2
  import 'pinia';
3
3
  import '@/composables';
4
4
  import '@pinia-orm/normalizr';
package/dist/index.cjs CHANGED
@@ -114,11 +114,17 @@ class Relation extends Attribute {
114
114
  }
115
115
  }
116
116
  /**
117
- * Get the index key defined by the primary key or keys (composite)
117
+ * Generate the index key defined by the primary key or keys (composite)
118
118
  */
119
119
  getKey(key) {
120
120
  return Utils.isArray(key) ? `[${key.join(",")}]` : key;
121
121
  }
122
+ /**
123
+ * Get the index key defined by the primary key or keys (composite)
124
+ */
125
+ getResolvedKey(model, key) {
126
+ return Utils.isArray(key) ? `[${key.map((keyPart) => model[keyPart]).toString()}]` : model[key];
127
+ }
122
128
  }
123
129
 
124
130
  var __defProp$j = Object.defineProperty;
@@ -2181,7 +2187,7 @@ class HasOne extends Relation {
2181
2187
  match(relation, models, query) {
2182
2188
  const dictionary = this.buildDictionary(query.get(false));
2183
2189
  models.forEach((model) => {
2184
- const key = model[this.getKey(this.localKey)];
2190
+ const key = this.getResolvedKey(model, this.localKey);
2185
2191
  dictionary[key] ? model.$setRelation(relation, dictionary[key][0]) : model.$setRelation(relation, null);
2186
2192
  });
2187
2193
  }
@@ -2190,7 +2196,7 @@ class HasOne extends Relation {
2190
2196
  */
2191
2197
  buildDictionary(results) {
2192
2198
  return this.mapToDictionary(results, (result) => {
2193
- return [result[this.getKey(this.foreignKey)], result];
2199
+ return [this.getResolvedKey(result, this.foreignKey), result];
2194
2200
  });
2195
2201
  }
2196
2202
  /**
@@ -2280,7 +2286,7 @@ class BelongsTo extends Relation {
2280
2286
  match(relation, models, query) {
2281
2287
  const dictionary = this.buildDictionary(query.get(false));
2282
2288
  models.forEach((model) => {
2283
- const key = model[this.getKey(this.foreignKey)];
2289
+ const key = this.getResolvedKey(model, this.foreignKey);
2284
2290
  dictionary[key] ? model.$setRelation(relation, dictionary[key]) : model.$setRelation(relation, null);
2285
2291
  });
2286
2292
  }
@@ -2289,7 +2295,7 @@ class BelongsTo extends Relation {
2289
2295
  */
2290
2296
  buildDictionary(models) {
2291
2297
  return models.reduce((dictionary, model) => {
2292
- dictionary[model[this.getKey(this.ownerKey)]] = model;
2298
+ dictionary[this.getResolvedKey(model, this.ownerKey)] = model;
2293
2299
  return dictionary;
2294
2300
  }, {});
2295
2301
  }
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as Repository, C as Constructor, M as Model, Q as Query, D as DataStore, E as Elements, W as WeakCache, F as FilledInstallOptions } from './shared/pinia-orm.89228fae.cjs';
2
- export { A as AfterHook, y as Attribute, B as BeforeHook, K as BelongsTo, L as BelongsToMany, am as CacheConfig, g as CacheConfigOptions, a0 as CastAttribute, $ as Casts, b as Collection, i as CreatePiniaOrm, c as DataStoreState, k as Database, z as Dictionary, ah as EagerLoad, ai as EagerLoadConstraint, a as Element, a6 as GetElementType, ac as Group, ae as GroupBy, af as GroupByFields, G as GroupedCollection, O as HasMany, U as HasManyBy, V as HasManyThrough, T as HasOne, w as InheritanceTypes, h as InstallOptions, a3 as Interpreter, I as Item, v as MetaValues, f as ModelConfigOptions, m as ModelFields, t as ModelOptions, o as ModelRegistries, q as ModelRegistry, n as ModelSchemas, X as MorphMany, _ as MorphOne, Y as MorphTo, Z as MorphToMany, aj as Mutator, ak as MutatorFunctions, al as Mutators, a5 as NonMethodKeys, N as NormalizedData, ab as Order, ad as OrderBy, ag as OrderDirection, d as PiniaOrmPlugin, P as PiniaOrmPluginContext, s as PrimaryKey, J as Relation, l as Schema, S as Schemas, a2 as Type, a1 as TypeDefault, a7 as UltimateKeys, a4 as Where, aa as WhereGroup, a8 as WherePrimaryClosure, a9 as WhereSecondaryClosure, x as WithKeys, j as createORM, e as definePiniaOrmPlugin, H as deleteModes, p as plugins, r as registerPlugins, u as useDataStore } from './shared/pinia-orm.89228fae.cjs';
1
+ import { R as Repository, C as Constructor, M as Model, Q as Query, D as DataStore, E as Elements, W as WeakCache, F as FilledInstallOptions } from './shared/pinia-orm.67fc2547.cjs';
2
+ export { A as AfterHook, y as Attribute, B as BeforeHook, K as BelongsTo, L as BelongsToMany, am as CacheConfig, g as CacheConfigOptions, a0 as CastAttribute, $ as Casts, b as Collection, i as CreatePiniaOrm, c as DataStoreState, k as Database, z as Dictionary, ah as EagerLoad, ai as EagerLoadConstraint, a as Element, a6 as GetElementType, ac as Group, ae as GroupBy, af as GroupByFields, G as GroupedCollection, O as HasMany, U as HasManyBy, V as HasManyThrough, T as HasOne, w as InheritanceTypes, h as InstallOptions, a3 as Interpreter, I as Item, v as MetaValues, f as ModelConfigOptions, m as ModelFields, t as ModelOptions, o as ModelRegistries, q as ModelRegistry, n as ModelSchemas, X as MorphMany, _ as MorphOne, Y as MorphTo, Z as MorphToMany, aj as Mutator, ak as MutatorFunctions, al as Mutators, a5 as NonMethodKeys, N as NormalizedData, ab as Order, ad as OrderBy, ag as OrderDirection, d as PiniaOrmPlugin, P as PiniaOrmPluginContext, s as PrimaryKey, J as Relation, l as Schema, S as Schemas, a2 as Type, a1 as TypeDefault, a7 as UltimateKeys, a4 as Where, aa as WhereGroup, a8 as WherePrimaryClosure, a9 as WhereSecondaryClosure, x as WithKeys, j as createORM, e as definePiniaOrmPlugin, H as deleteModes, p as plugins, r as registerPlugins, u as useDataStore } from './shared/pinia-orm.67fc2547.cjs';
3
3
  import { Pinia } from 'pinia';
4
4
  import '@/composables';
5
5
  import '@pinia-orm/normalizr';
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as Repository, C as Constructor, M as Model, Q as Query, D as DataStore, E as Elements, W as WeakCache, F as FilledInstallOptions } from './shared/pinia-orm.89228fae.mjs';
2
- export { A as AfterHook, y as Attribute, B as BeforeHook, K as BelongsTo, L as BelongsToMany, am as CacheConfig, g as CacheConfigOptions, a0 as CastAttribute, $ as Casts, b as Collection, i as CreatePiniaOrm, c as DataStoreState, k as Database, z as Dictionary, ah as EagerLoad, ai as EagerLoadConstraint, a as Element, a6 as GetElementType, ac as Group, ae as GroupBy, af as GroupByFields, G as GroupedCollection, O as HasMany, U as HasManyBy, V as HasManyThrough, T as HasOne, w as InheritanceTypes, h as InstallOptions, a3 as Interpreter, I as Item, v as MetaValues, f as ModelConfigOptions, m as ModelFields, t as ModelOptions, o as ModelRegistries, q as ModelRegistry, n as ModelSchemas, X as MorphMany, _ as MorphOne, Y as MorphTo, Z as MorphToMany, aj as Mutator, ak as MutatorFunctions, al as Mutators, a5 as NonMethodKeys, N as NormalizedData, ab as Order, ad as OrderBy, ag as OrderDirection, d as PiniaOrmPlugin, P as PiniaOrmPluginContext, s as PrimaryKey, J as Relation, l as Schema, S as Schemas, a2 as Type, a1 as TypeDefault, a7 as UltimateKeys, a4 as Where, aa as WhereGroup, a8 as WherePrimaryClosure, a9 as WhereSecondaryClosure, x as WithKeys, j as createORM, e as definePiniaOrmPlugin, H as deleteModes, p as plugins, r as registerPlugins, u as useDataStore } from './shared/pinia-orm.89228fae.mjs';
1
+ import { R as Repository, C as Constructor, M as Model, Q as Query, D as DataStore, E as Elements, W as WeakCache, F as FilledInstallOptions } from './shared/pinia-orm.67fc2547.mjs';
2
+ export { A as AfterHook, y as Attribute, B as BeforeHook, K as BelongsTo, L as BelongsToMany, am as CacheConfig, g as CacheConfigOptions, a0 as CastAttribute, $ as Casts, b as Collection, i as CreatePiniaOrm, c as DataStoreState, k as Database, z as Dictionary, ah as EagerLoad, ai as EagerLoadConstraint, a as Element, a6 as GetElementType, ac as Group, ae as GroupBy, af as GroupByFields, G as GroupedCollection, O as HasMany, U as HasManyBy, V as HasManyThrough, T as HasOne, w as InheritanceTypes, h as InstallOptions, a3 as Interpreter, I as Item, v as MetaValues, f as ModelConfigOptions, m as ModelFields, t as ModelOptions, o as ModelRegistries, q as ModelRegistry, n as ModelSchemas, X as MorphMany, _ as MorphOne, Y as MorphTo, Z as MorphToMany, aj as Mutator, ak as MutatorFunctions, al as Mutators, a5 as NonMethodKeys, N as NormalizedData, ab as Order, ad as OrderBy, ag as OrderDirection, d as PiniaOrmPlugin, P as PiniaOrmPluginContext, s as PrimaryKey, J as Relation, l as Schema, S as Schemas, a2 as Type, a1 as TypeDefault, a7 as UltimateKeys, a4 as Where, aa as WhereGroup, a8 as WherePrimaryClosure, a9 as WhereSecondaryClosure, x as WithKeys, j as createORM, e as definePiniaOrmPlugin, H as deleteModes, p as plugins, r as registerPlugins, u as useDataStore } from './shared/pinia-orm.67fc2547.mjs';
3
3
  import { Pinia } from 'pinia';
4
4
  import '@/composables';
5
5
  import '@pinia-orm/normalizr';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as Repository, C as Constructor, M as Model, Q as Query, D as DataStore, E as Elements, W as WeakCache, F as FilledInstallOptions } from './shared/pinia-orm.89228fae.js';
2
- export { A as AfterHook, y as Attribute, B as BeforeHook, K as BelongsTo, L as BelongsToMany, am as CacheConfig, g as CacheConfigOptions, a0 as CastAttribute, $ as Casts, b as Collection, i as CreatePiniaOrm, c as DataStoreState, k as Database, z as Dictionary, ah as EagerLoad, ai as EagerLoadConstraint, a as Element, a6 as GetElementType, ac as Group, ae as GroupBy, af as GroupByFields, G as GroupedCollection, O as HasMany, U as HasManyBy, V as HasManyThrough, T as HasOne, w as InheritanceTypes, h as InstallOptions, a3 as Interpreter, I as Item, v as MetaValues, f as ModelConfigOptions, m as ModelFields, t as ModelOptions, o as ModelRegistries, q as ModelRegistry, n as ModelSchemas, X as MorphMany, _ as MorphOne, Y as MorphTo, Z as MorphToMany, aj as Mutator, ak as MutatorFunctions, al as Mutators, a5 as NonMethodKeys, N as NormalizedData, ab as Order, ad as OrderBy, ag as OrderDirection, d as PiniaOrmPlugin, P as PiniaOrmPluginContext, s as PrimaryKey, J as Relation, l as Schema, S as Schemas, a2 as Type, a1 as TypeDefault, a7 as UltimateKeys, a4 as Where, aa as WhereGroup, a8 as WherePrimaryClosure, a9 as WhereSecondaryClosure, x as WithKeys, j as createORM, e as definePiniaOrmPlugin, H as deleteModes, p as plugins, r as registerPlugins, u as useDataStore } from './shared/pinia-orm.89228fae.js';
1
+ import { R as Repository, C as Constructor, M as Model, Q as Query, D as DataStore, E as Elements, W as WeakCache, F as FilledInstallOptions } from './shared/pinia-orm.67fc2547.js';
2
+ export { A as AfterHook, y as Attribute, B as BeforeHook, K as BelongsTo, L as BelongsToMany, am as CacheConfig, g as CacheConfigOptions, a0 as CastAttribute, $ as Casts, b as Collection, i as CreatePiniaOrm, c as DataStoreState, k as Database, z as Dictionary, ah as EagerLoad, ai as EagerLoadConstraint, a as Element, a6 as GetElementType, ac as Group, ae as GroupBy, af as GroupByFields, G as GroupedCollection, O as HasMany, U as HasManyBy, V as HasManyThrough, T as HasOne, w as InheritanceTypes, h as InstallOptions, a3 as Interpreter, I as Item, v as MetaValues, f as ModelConfigOptions, m as ModelFields, t as ModelOptions, o as ModelRegistries, q as ModelRegistry, n as ModelSchemas, X as MorphMany, _ as MorphOne, Y as MorphTo, Z as MorphToMany, aj as Mutator, ak as MutatorFunctions, al as Mutators, a5 as NonMethodKeys, N as NormalizedData, ab as Order, ad as OrderBy, ag as OrderDirection, d as PiniaOrmPlugin, P as PiniaOrmPluginContext, s as PrimaryKey, J as Relation, l as Schema, S as Schemas, a2 as Type, a1 as TypeDefault, a7 as UltimateKeys, a4 as Where, aa as WhereGroup, a8 as WherePrimaryClosure, a9 as WhereSecondaryClosure, x as WithKeys, j as createORM, e as definePiniaOrmPlugin, H as deleteModes, p as plugins, r as registerPlugins, u as useDataStore } from './shared/pinia-orm.67fc2547.js';
3
3
  import { Pinia } from 'pinia';
4
4
  import '@/composables';
5
5
  import '@pinia-orm/normalizr';
package/dist/index.mjs CHANGED
@@ -112,11 +112,17 @@ class Relation extends Attribute {
112
112
  }
113
113
  }
114
114
  /**
115
- * Get the index key defined by the primary key or keys (composite)
115
+ * Generate the index key defined by the primary key or keys (composite)
116
116
  */
117
117
  getKey(key) {
118
118
  return isArray(key) ? `[${key.join(",")}]` : key;
119
119
  }
120
+ /**
121
+ * Get the index key defined by the primary key or keys (composite)
122
+ */
123
+ getResolvedKey(model, key) {
124
+ return isArray(key) ? `[${key.map((keyPart) => model[keyPart]).toString()}]` : model[key];
125
+ }
120
126
  }
121
127
 
122
128
  var __defProp$j = Object.defineProperty;
@@ -2179,7 +2185,7 @@ class HasOne extends Relation {
2179
2185
  match(relation, models, query) {
2180
2186
  const dictionary = this.buildDictionary(query.get(false));
2181
2187
  models.forEach((model) => {
2182
- const key = model[this.getKey(this.localKey)];
2188
+ const key = this.getResolvedKey(model, this.localKey);
2183
2189
  dictionary[key] ? model.$setRelation(relation, dictionary[key][0]) : model.$setRelation(relation, null);
2184
2190
  });
2185
2191
  }
@@ -2188,7 +2194,7 @@ class HasOne extends Relation {
2188
2194
  */
2189
2195
  buildDictionary(results) {
2190
2196
  return this.mapToDictionary(results, (result) => {
2191
- return [result[this.getKey(this.foreignKey)], result];
2197
+ return [this.getResolvedKey(result, this.foreignKey), result];
2192
2198
  });
2193
2199
  }
2194
2200
  /**
@@ -2278,7 +2284,7 @@ class BelongsTo extends Relation {
2278
2284
  match(relation, models, query) {
2279
2285
  const dictionary = this.buildDictionary(query.get(false));
2280
2286
  models.forEach((model) => {
2281
- const key = model[this.getKey(this.foreignKey)];
2287
+ const key = this.getResolvedKey(model, this.foreignKey);
2282
2288
  dictionary[key] ? model.$setRelation(relation, dictionary[key]) : model.$setRelation(relation, null);
2283
2289
  });
2284
2290
  }
@@ -2287,7 +2293,7 @@ class BelongsTo extends Relation {
2287
2293
  */
2288
2294
  buildDictionary(models) {
2289
2295
  return models.reduce((dictionary, model) => {
2290
- dictionary[model[this.getKey(this.ownerKey)]] = model;
2296
+ dictionary[this.getResolvedKey(model, this.ownerKey)] = model;
2291
2297
  return dictionary;
2292
2298
  }, {});
2293
2299
  }
@@ -1,4 +1,4 @@
1
- import { a0 as CastAttribute, aq as NanoidOptions, m as ModelFields, an as PropertyDecorator } from '../shared/pinia-orm.89228fae.cjs';
1
+ import { a0 as CastAttribute, aq as NanoidOptions, m as ModelFields, an as PropertyDecorator } from '../shared/pinia-orm.67fc2547.cjs';
2
2
  import 'pinia';
3
3
  import '@/composables';
4
4
  import '@pinia-orm/normalizr';
@@ -1,4 +1,4 @@
1
- import { a0 as CastAttribute, aq as NanoidOptions, m as ModelFields, an as PropertyDecorator } from '../shared/pinia-orm.89228fae.mjs';
1
+ import { a0 as CastAttribute, aq as NanoidOptions, m as ModelFields, an as PropertyDecorator } from '../shared/pinia-orm.67fc2547.mjs';
2
2
  import 'pinia';
3
3
  import '@/composables';
4
4
  import '@pinia-orm/normalizr';
@@ -1,4 +1,4 @@
1
- import { a0 as CastAttribute, aq as NanoidOptions, m as ModelFields, an as PropertyDecorator } from '../shared/pinia-orm.89228fae.js';
1
+ import { a0 as CastAttribute, aq as NanoidOptions, m as ModelFields, an as PropertyDecorator } from '../shared/pinia-orm.67fc2547.js';
2
2
  import 'pinia';
3
3
  import '@/composables';
4
4
  import '@pinia-orm/normalizr';
@@ -1,4 +1,4 @@
1
- import { a0 as CastAttribute, aq as NanoidOptions, m as ModelFields, an as PropertyDecorator } from '../shared/pinia-orm.89228fae.cjs';
1
+ import { a0 as CastAttribute, aq as NanoidOptions, m as ModelFields, an as PropertyDecorator } from '../shared/pinia-orm.67fc2547.cjs';
2
2
  import 'pinia';
3
3
  import '@/composables';
4
4
  import '@pinia-orm/normalizr';
@@ -1,4 +1,4 @@
1
- import { a0 as CastAttribute, aq as NanoidOptions, m as ModelFields, an as PropertyDecorator } from '../shared/pinia-orm.89228fae.mjs';
1
+ import { a0 as CastAttribute, aq as NanoidOptions, m as ModelFields, an as PropertyDecorator } from '../shared/pinia-orm.67fc2547.mjs';
2
2
  import 'pinia';
3
3
  import '@/composables';
4
4
  import '@pinia-orm/normalizr';
@@ -1,4 +1,4 @@
1
- import { a0 as CastAttribute, aq as NanoidOptions, m as ModelFields, an as PropertyDecorator } from '../shared/pinia-orm.89228fae.js';
1
+ import { a0 as CastAttribute, aq as NanoidOptions, m as ModelFields, an as PropertyDecorator } from '../shared/pinia-orm.67fc2547.js';
2
2
  import 'pinia';
3
3
  import '@/composables';
4
4
  import '@pinia-orm/normalizr';
@@ -1,4 +1,4 @@
1
- import { a0 as CastAttribute, aq as NanoidOptions, m as ModelFields, an as PropertyDecorator } from '../shared/pinia-orm.89228fae.cjs';
1
+ import { a0 as CastAttribute, aq as NanoidOptions, m as ModelFields, an as PropertyDecorator } from '../shared/pinia-orm.67fc2547.cjs';
2
2
  import 'pinia';
3
3
  import '@/composables';
4
4
  import '@pinia-orm/normalizr';
@@ -1,4 +1,4 @@
1
- import { a0 as CastAttribute, aq as NanoidOptions, m as ModelFields, an as PropertyDecorator } from '../shared/pinia-orm.89228fae.mjs';
1
+ import { a0 as CastAttribute, aq as NanoidOptions, m as ModelFields, an as PropertyDecorator } from '../shared/pinia-orm.67fc2547.mjs';
2
2
  import 'pinia';
3
3
  import '@/composables';
4
4
  import '@pinia-orm/normalizr';
@@ -1,4 +1,4 @@
1
- import { a0 as CastAttribute, aq as NanoidOptions, m as ModelFields, an as PropertyDecorator } from '../shared/pinia-orm.89228fae.js';
1
+ import { a0 as CastAttribute, aq as NanoidOptions, m as ModelFields, an as PropertyDecorator } from '../shared/pinia-orm.67fc2547.js';
2
2
  import 'pinia';
3
3
  import '@/composables';
4
4
  import '@pinia-orm/normalizr';
@@ -736,9 +736,13 @@ declare abstract class Relation extends Attribute {
736
736
  */
737
737
  protected compositeKeyMapper(foreignKey: PrimaryKey, localKey: PrimaryKey, call: (foreignKey: string, localKey: string) => void): void;
738
738
  /**
739
- * Get the index key defined by the primary key or keys (composite)
739
+ * Generate the index key defined by the primary key or keys (composite)
740
740
  */
741
741
  protected getKey(key: PrimaryKey): string;
742
+ /**
743
+ * Get the index key defined by the primary key or keys (composite)
744
+ */
745
+ protected getResolvedKey(model: Model, key: PrimaryKey): string;
742
746
  }
743
747
 
744
748
  declare class HasOne extends Relation {
@@ -736,9 +736,13 @@ declare abstract class Relation extends Attribute {
736
736
  */
737
737
  protected compositeKeyMapper(foreignKey: PrimaryKey, localKey: PrimaryKey, call: (foreignKey: string, localKey: string) => void): void;
738
738
  /**
739
- * Get the index key defined by the primary key or keys (composite)
739
+ * Generate the index key defined by the primary key or keys (composite)
740
740
  */
741
741
  protected getKey(key: PrimaryKey): string;
742
+ /**
743
+ * Get the index key defined by the primary key or keys (composite)
744
+ */
745
+ protected getResolvedKey(model: Model, key: PrimaryKey): string;
742
746
  }
743
747
 
744
748
  declare class HasOne extends Relation {
@@ -736,9 +736,13 @@ declare abstract class Relation extends Attribute {
736
736
  */
737
737
  protected compositeKeyMapper(foreignKey: PrimaryKey, localKey: PrimaryKey, call: (foreignKey: string, localKey: string) => void): void;
738
738
  /**
739
- * Get the index key defined by the primary key or keys (composite)
739
+ * Generate the index key defined by the primary key or keys (composite)
740
740
  */
741
741
  protected getKey(key: PrimaryKey): string;
742
+ /**
743
+ * Get the index key defined by the primary key or keys (composite)
744
+ */
745
+ protected getResolvedKey(model: Model, key: PrimaryKey): string;
742
746
  }
743
747
 
744
748
  declare class HasOne extends Relation {
@@ -1,5 +1,5 @@
1
1
  import { V1Options } from 'uuid';
2
- import { a0 as CastAttribute, m as ModelFields, an as PropertyDecorator } from '../shared/pinia-orm.89228fae.cjs';
2
+ import { a0 as CastAttribute, m as ModelFields, an as PropertyDecorator } from '../shared/pinia-orm.67fc2547.cjs';
3
3
  import 'pinia';
4
4
  import '@/composables';
5
5
  import '@pinia-orm/normalizr';
@@ -1,5 +1,5 @@
1
1
  import { V1Options } from 'uuid';
2
- import { a0 as CastAttribute, m as ModelFields, an as PropertyDecorator } from '../shared/pinia-orm.89228fae.mjs';
2
+ import { a0 as CastAttribute, m as ModelFields, an as PropertyDecorator } from '../shared/pinia-orm.67fc2547.mjs';
3
3
  import 'pinia';
4
4
  import '@/composables';
5
5
  import '@pinia-orm/normalizr';
package/dist/uuid/v1.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { V1Options } from 'uuid';
2
- import { a0 as CastAttribute, m as ModelFields, an as PropertyDecorator } from '../shared/pinia-orm.89228fae.js';
2
+ import { a0 as CastAttribute, m as ModelFields, an as PropertyDecorator } from '../shared/pinia-orm.67fc2547.js';
3
3
  import 'pinia';
4
4
  import '@/composables';
5
5
  import '@pinia-orm/normalizr';
@@ -1,5 +1,5 @@
1
1
  import { V4Options } from 'uuid';
2
- import { a0 as CastAttribute, m as ModelFields, an as PropertyDecorator } from '../shared/pinia-orm.89228fae.cjs';
2
+ import { a0 as CastAttribute, m as ModelFields, an as PropertyDecorator } from '../shared/pinia-orm.67fc2547.cjs';
3
3
  import 'pinia';
4
4
  import '@/composables';
5
5
  import '@pinia-orm/normalizr';
@@ -1,5 +1,5 @@
1
1
  import { V4Options } from 'uuid';
2
- import { a0 as CastAttribute, m as ModelFields, an as PropertyDecorator } from '../shared/pinia-orm.89228fae.mjs';
2
+ import { a0 as CastAttribute, m as ModelFields, an as PropertyDecorator } from '../shared/pinia-orm.67fc2547.mjs';
3
3
  import 'pinia';
4
4
  import '@/composables';
5
5
  import '@pinia-orm/normalizr';
package/dist/uuid/v4.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { V4Options } from 'uuid';
2
- import { a0 as CastAttribute, m as ModelFields, an as PropertyDecorator } from '../shared/pinia-orm.89228fae.js';
2
+ import { a0 as CastAttribute, m as ModelFields, an as PropertyDecorator } from '../shared/pinia-orm.67fc2547.js';
3
3
  import 'pinia';
4
4
  import '@/composables';
5
5
  import '@pinia-orm/normalizr';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinia-orm-edge",
3
- "version": "1.10.0-28686653.93359fd",
3
+ "version": "1.10.0-28691799.920f43b",
4
4
  "description": "The Pinia plugin to enable Object-Relational Mapping access to the Pinia Store.",
5
5
  "keywords": [
6
6
  "vue",
@@ -46,7 +46,7 @@
46
46
  "pinia": "^2.1.7"
47
47
  },
48
48
  "dependencies": {
49
- "@pinia-orm/normalizr": "npm:@pinia-orm/normalizr-edge@1.10.0-28686653.93359fd"
49
+ "@pinia-orm/normalizr": "npm:@pinia-orm/normalizr-edge@1.10.0-28691799.920f43b"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@nuxt/eslint-config": "^0.3.13",