c2-mongoose 2.1.386 → 2.1.388

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.
@@ -37,6 +37,7 @@ var OneToManyFlowItem = /** @class */ (function () {
37
37
  var model = mongoose_1.default.connection.models[Object.keys(mongoose_1.default.connection.models).find(function (key) { return mongoose_1.default.connection.models[key].collection.name === foreing.collectionChild; })];
38
38
  console.info("finding", foreing.collectionChild);
39
39
  console.info("model", model);
40
+ console.info("models name", mongoose_1.default.modelNames());
40
41
  if (model) {
41
42
  var populates = populate.split(" ").filter(function (p) { return p.startsWith(labeled); });
42
43
  console.info("iterate", populates);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-mongoose",
3
- "version": "2.1.386",
3
+ "version": "2.1.388",
4
4
  "description": "Lib to make any search in database mongoose and use as basic crud",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -25,13 +25,14 @@ class OneToManyFlowItem {
25
25
 
26
26
  collection = [...collection, ...populateClauseLookup]
27
27
 
28
- const model = mongoose.connection.models[
28
+ let model = mongoose.connection.models[
29
29
  Object.keys(mongoose.connection.models).find(
30
30
  key => mongoose.connection.models[key].collection.name === foreing.collectionChild
31
31
  )!
32
32
  ];
33
33
  console.info("finding", foreing.collectionChild)
34
34
  console.info("model", model)
35
+ console.info("models name", mongoose.modelNames())
35
36
 
36
37
  if (model) {
37
38
  const populates = populate.split(" ").filter((p: string) => p.startsWith(labeled))