@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 ? { $
|
|
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 ? { $
|
|
251
|
+
operator: value ? { $in: [null, undefined] } : { $nin: [null, undefined] }
|
|
250
252
|
};
|
|
251
253
|
}
|
|
252
254
|
else if (lookup === 'exact') {
|
package/package.json
CHANGED