pangea-server 1.0.79 → 1.0.80

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.
@@ -270,7 +270,7 @@ function getInclude(model, config = {}, relDepth = new Map()) {
270
270
  const maxDepth = rel.joinDepth;
271
271
  if (currentDepth >= maxDepth)
272
272
  continue;
273
- if (rel.exclude)
273
+ if (rel.notInclude)
274
274
  continue;
275
275
  const relWhere = cleanWhere[relName];
276
276
  delete cleanWhere[relName];
@@ -1,7 +1,7 @@
1
1
  import type { GetModelFn } from '../database.types';
2
2
  type RelationOptions = {
3
3
  foreignKey?: string;
4
- exclude?: boolean;
4
+ notInclude?: boolean;
5
5
  required?: boolean;
6
6
  paranoid?: boolean;
7
7
  joinDepth?: number;
@@ -35,8 +35,8 @@ function getRelation(relationFn) {
35
35
  const { foreignKey, ...relOptions } = options;
36
36
  relationFn(getModelFn, { as: propertyName, ...(foreignKey && { foreignKey }) })(target, propertyName);
37
37
  const model = target.constructor;
38
- const { exclude = false, required = relationFn === seq.BelongsTo ? !model.Columns[`${propertyName}Id`].allowNull : false, paranoid = relationFn !== seq.BelongsTo, joinDepth = 1, ...restOptions } = relOptions;
39
- model.AddRelation(propertyName, { getModelFn, exclude, required, paranoid, joinDepth, ...restOptions });
38
+ const { notInclude = false, required = relationFn === seq.BelongsTo ? !model.Columns[`${propertyName}Id`].allowNull : false, paranoid = relationFn !== seq.BelongsTo, joinDepth = 1, ...restOptions } = relOptions;
39
+ model.AddRelation(propertyName, { getModelFn, notInclude, required, paranoid, joinDepth, ...restOptions });
40
40
  };
41
41
  };
42
42
  }
@@ -7,7 +7,7 @@ type Column = {
7
7
  type Columns = Record<string, Column>;
8
8
  type Relation = {
9
9
  getModelFn: GetModelFn;
10
- exclude: boolean;
10
+ notInclude: boolean;
11
11
  required: boolean;
12
12
  paranoid: boolean;
13
13
  joinDepth: number;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pangea-server",
3
3
  "description": "",
4
- "version": "1.0.79",
4
+ "version": "1.0.80",
5
5
  "files": [
6
6
  "dist"
7
7
  ],