@koalarx/nest 3.1.46 → 3.1.47
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.
|
@@ -128,6 +128,14 @@ class EntityBase {
|
|
|
128
128
|
this[key] = props[key];
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
+
if (!this._id) {
|
|
132
|
+
const idConfig = Reflect.getMetadata('entity:id', this.constructor.prototype);
|
|
133
|
+
if (idConfig && idConfig.composite) {
|
|
134
|
+
this._id = idConfig.composite
|
|
135
|
+
.map((idPart) => this[idPart])
|
|
136
|
+
.join('-');
|
|
137
|
+
}
|
|
138
|
+
}
|
|
131
139
|
}
|
|
132
140
|
}
|
|
133
141
|
equals(obj) {
|