@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 +1 -1
- package/dist/meta.js +5 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
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
|
-
|
|
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
|
}
|