arkormx 2.5.0 → 2.5.1

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/index.cjs CHANGED
@@ -6739,11 +6739,11 @@ var Model = class Model {
6739
6739
  const constructor = this.constructor;
6740
6740
  const primaryKey = constructor.getPrimaryKey();
6741
6741
  const identifier = this.getAttribute(primaryKey);
6742
- const payload = this.getRawAttributes();
6743
6742
  const previousOriginal = this.getOriginal();
6744
6743
  if (identifier == null) {
6745
6744
  await Model.dispatchEvent(constructor, "saving", this);
6746
6745
  await Model.dispatchEvent(constructor, "creating", this);
6746
+ const payload = this.getRawAttributes();
6747
6747
  const model = await constructor.query().create(payload);
6748
6748
  this.fill(model.getRawAttributes());
6749
6749
  this.syncChanges(previousOriginal);
@@ -6754,6 +6754,7 @@ var Model = class Model {
6754
6754
  }
6755
6755
  await Model.dispatchEvent(constructor, "saving", this);
6756
6756
  await Model.dispatchEvent(constructor, "updating", this);
6757
+ const payload = this.getRawAttributes();
6757
6758
  const model = await constructor.query().where({ [primaryKey]: identifier }).update(payload);
6758
6759
  this.fill(model.getRawAttributes());
6759
6760
  this.syncChanges(previousOriginal);
package/dist/index.mjs CHANGED
@@ -6738,11 +6738,11 @@ var Model = class Model {
6738
6738
  const constructor = this.constructor;
6739
6739
  const primaryKey = constructor.getPrimaryKey();
6740
6740
  const identifier = this.getAttribute(primaryKey);
6741
- const payload = this.getRawAttributes();
6742
6741
  const previousOriginal = this.getOriginal();
6743
6742
  if (identifier == null) {
6744
6743
  await Model.dispatchEvent(constructor, "saving", this);
6745
6744
  await Model.dispatchEvent(constructor, "creating", this);
6745
+ const payload = this.getRawAttributes();
6746
6746
  const model = await constructor.query().create(payload);
6747
6747
  this.fill(model.getRawAttributes());
6748
6748
  this.syncChanges(previousOriginal);
@@ -6753,6 +6753,7 @@ var Model = class Model {
6753
6753
  }
6754
6754
  await Model.dispatchEvent(constructor, "saving", this);
6755
6755
  await Model.dispatchEvent(constructor, "updating", this);
6756
+ const payload = this.getRawAttributes();
6756
6757
  const model = await constructor.query().where({ [primaryKey]: identifier }).update(payload);
6757
6758
  this.fill(model.getRawAttributes());
6758
6759
  this.syncChanges(previousOriginal);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arkormx",
3
- "version": "2.5.0",
3
+ "version": "2.5.1",
4
4
  "description": "Modern TypeScript-first ORM for Node.js.",
5
5
  "keywords": [
6
6
  "orm",