@rdyl/node-mysql 0.3.7 → 0.3.9

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/CHANGELOG.md CHANGED
@@ -1,4 +1,4 @@
1
- ## 0.3.7 (2025-12-31)
1
+ ## 0.3.8 (2025-12-31)
2
2
 
3
3
 
4
4
 
package/dist/meta.js CHANGED
@@ -81,7 +81,9 @@ var MysqlDbSchema = /** @class */ (function () {
81
81
  Object.defineProperty(MysqlDbSchema.prototype, "$mapFields", {
82
82
  get: function () {
83
83
  var _this = this;
84
- return this.$fields.filter(function (k) { return !_this.$mapExFields.includes(k); });
84
+ var list = this.$fields.filter(function (k) { return !_this.$mapExFields.includes(k); });
85
+ list.push.apply(list, Object.keys(this.$related));
86
+ return list;
85
87
  },
86
88
  enumerable: false,
87
89
  configurable: true
@@ -99,7 +101,8 @@ var MysqlDbSchema = /** @class */ (function () {
99
101
  MysqlDbSchema.prototype.$formJson = function (json) {
100
102
  var _this = this;
101
103
  Object.keys(json).forEach(function (k) {
102
- if (Object.prototype.hasOwnProperty.call(_this, k)) {
104
+ if (Object.prototype.hasOwnProperty.call(_this, k) ||
105
+ _this.$mapFields.includes(k)) {
103
106
  // @ts-ignore
104
107
  _this[k] = json[k];
105
108
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rdyl/node-mysql",
3
- "version": "0.3.7",
3
+ "version": "0.3.9",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "types": "types/index.d.ts",