@buka/nestjs-kit 4.4.11 → 4.4.12

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.mjs CHANGED
@@ -822,8 +822,14 @@ var ModelRegister = class {
822
822
  * ```
823
823
  */
824
824
  static getModelPropertyKeys(target) {
825
- const metadata = this.getModel(target);
826
- return metadata ? metadata.propertyKeys : [];
825
+ const keys = /* @__PURE__ */ new Set();
826
+ let current = target;
827
+ while (current && current !== Object) {
828
+ const metadata = this.getModel(current);
829
+ if (metadata) for (const key of metadata.propertyKeys) keys.add(key);
830
+ current = Object.getPrototypeOf(current.prototype)?.constructor ?? null;
831
+ }
832
+ return Array.from(keys);
827
833
  }
828
834
  static getProperties(target) {
829
835
  return this.getModelPropertyKeys(target).map((propertyKey) => this.getProperty(target, propertyKey)).filter((property) => !!property);