prisma-sql 1.75.5 → 1.75.6

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