@statezero/core 0.1.89 → 0.1.90

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.
@@ -220,9 +220,10 @@ function createOperatorFromLookup(field, lookup, value, isRelationship, ModelCla
220
220
  if (isRelationship) {
221
221
  // For relationship fields with lookups, we need special handling
222
222
  if (lookup === 'isnull') {
223
+ // Check for both undefined and null values
223
224
  return {
224
225
  field,
225
- operator: value ? { $exists: false } : { $exists: true }
226
+ operator: value ? { $in: [null, undefined] } : { $nin: [null, undefined] }
226
227
  };
227
228
  }
228
229
  else if (lookup === 'in') {
@@ -244,9 +245,10 @@ function createOperatorFromLookup(field, lookup, value, isRelationship, ModelCla
244
245
  }
245
246
  // Regular field lookups (same as in the original code)
246
247
  if (lookup === 'isnull') {
248
+ // Check for both undefined and null values
247
249
  return {
248
250
  field,
249
- operator: value ? { $exists: false } : { $exists: true }
251
+ operator: value ? { $in: [null, undefined] } : { $nin: [null, undefined] }
250
252
  };
251
253
  }
252
254
  else if (lookup === 'exact') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@statezero/core",
3
- "version": "0.1.89",
3
+ "version": "0.1.90",
4
4
  "type": "module",
5
5
  "module": "ESNext",
6
6
  "description": "The type-safe frontend client for StateZero - connect directly to your backend models with zero boilerplate",