remult 3.0.3 → 3.0.4

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.
@@ -526,7 +526,7 @@ export class FilterSerializer {
526
526
  if (val === undefined)
527
527
  this.hasUndefined = true;
528
528
  let r = this.result;
529
- if (!r[key]) {
529
+ if (r[key] === undefined) {
530
530
  r[key] = val;
531
531
  return;
532
532
  }
@@ -67,7 +67,7 @@ export class Validators {
67
67
  */
68
68
  static enum = createValueValidatorWithArgs((value, enumObj) => Object.values(enumObj).includes(value), (enumObj) => `Value must be one of ${getEnumValues(enumObj).join(', ')}`);
69
69
  /**
70
- * Validator to check if a related value exists in the database.
70
+ * Validator to check if a related value exists in the database. By side-effect it loads relation data so it is directly available in [lifecycle hooks](https://remult.dev/docs/lifecycle-hooks)
71
71
  */
72
72
  static relationExists = createValidator(async (_, e) => {
73
73
  if (e.valueIsNull())
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remult",
3
- "version": "3.0.3",
3
+ "version": "3.0.4",
4
4
  "description": "A CRUD framework for full-stack TypeScript",
5
5
  "homepage": "https://remult.dev",
6
6
  "repository": {
@@ -694,7 +694,7 @@ var FilterSerializer = /** @class */ (function () {
694
694
  if (val === undefined)
695
695
  this.hasUndefined = true;
696
696
  var r = this.result;
697
- if (!r[key]) {
697
+ if (r[key] === undefined) {
698
698
  r[key] = val;
699
699
  return;
700
700
  }
@@ -48,7 +48,7 @@ export declare class Validators {
48
48
  defaultMessage: ValueValidationMessage<unknown>;
49
49
  };
50
50
  /**
51
- * Validator to check if a related value exists in the database.
51
+ * Validator to check if a related value exists in the database. By side-effect it loads relation data so it is directly available in [lifecycle hooks](https://remult.dev/docs/lifecycle-hooks)
52
52
  */
53
53
  static relationExists: Validator<unknown>;
54
54
  /**
package/src/validators.js CHANGED
@@ -103,7 +103,7 @@ var Validators = /** @class */ (function () {
103
103
  return "Value must be one of ".concat(getEnumValues(enumObj).join(', '));
104
104
  });
105
105
  /**
106
- * Validator to check if a related value exists in the database.
106
+ * Validator to check if a related value exists in the database. By side-effect it loads relation data so it is directly available in [lifecycle hooks](https://remult.dev/docs/lifecycle-hooks)
107
107
  */
108
108
  Validators.relationExists = createValidator(function (_, e) { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
109
109
  var _b;