prisma-sql 1.75.5 → 1.75.7

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.
package/dist/index.cjs CHANGED
@@ -5645,7 +5645,7 @@ function resolveRelationOrderByChain(relationFieldName, value, currentModel, cur
5645
5645
  `Relation orderBy nesting too deep (max ${MAX_RELATION_ORDER_BY_DEPTH} levels)`
5646
5646
  );
5647
5647
  }
5648
- if ("_count" in value) {
5648
+ if ("_count" in value && value._count !== void 0) {
5649
5649
  throw new Error(
5650
5650
  `Relation orderBy with _count on '${relationFieldName}' is not yet supported by prisma-sql`
5651
5651
  );
@@ -5674,7 +5674,7 @@ function resolveRelationOrderByChain(relationFieldName, value, currentModel, cur
5674
5674
  ctx.joins.push(`LEFT JOIN ${tableRef} ${joinAlias} ON ${cond}`);
5675
5675
  const relScalarSet = getScalarFieldSet(relatedModel);
5676
5676
  const relRelationSet = getRelationFieldSet(relatedModel);
5677
- const nestedEntries = Object.entries(value);
5677
+ const nestedEntries = Object.entries(value).filter(([, v]) => v !== void 0);
5678
5678
  const orderFragments = [];
5679
5679
  for (const [nestedField, nestedValue] of nestedEntries) {
5680
5680
  if (relScalarSet.has(nestedField)) {