collection parentModel

This commit is contained in:
Yuri Kuznetsov
2024-07-09 07:56:27 +03:00
parent 32f1bfb1c6
commit 06c173486e
+8
View File
@@ -147,6 +147,13 @@ class Collection {
*/
lastSyncPromise = null
/**
* A parent model. To be used for own purposes. E.g. to have access to a parent from related models.
*
* @type {import('model').default}
*/
parentModel
/**
* @param {Model[]|null} [models] Models.
* @param {{
@@ -934,6 +941,7 @@ class Collection {
collection.maxSize = this.maxSize;
collection.maxMaxSize = this.maxMaxSize;
collection.whereFunction = this.whereFunction;
collection.parentModel = this.parentModel;
return collection;
}