diff --git a/packages/postgrest-core/src/fetch/dedupe.ts b/packages/postgrest-core/src/fetch/dedupe.ts index 0027bafa..021d2b06 100644 --- a/packages/postgrest-core/src/fetch/dedupe.ts +++ b/packages/postgrest-core/src/fetch/dedupe.ts @@ -9,6 +9,8 @@ export const dedupeGroupedPathsRecursive = ( const dedupeCounters = new Map(); return grouped.map((p, idx, a) => { + // never dedupe non-nested paths because even if there is a duplicate we always want to dedupe the nested path instead + // e.g. inbox_id,inbox_id(name) should be deduped to inbox_id,d_0_inbox_id:inbox_id(name) if (!isNestedPath(p)) return p; // dedupe current nested path if there is another path with the same `path`