Skip to content

Commit 91cc620

Browse files
committed
fix: select columns from correct table when filtering on fraction
Without specifying that selectAll() should give preference to columns present in the claims table, it ends up selecting fractions.units when the join is applied.
1 parent 028f072 commit 91cc620

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/services/SupabaseCachingService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ export class SupabaseCachingService extends BaseSupabaseService<CachingDatabase>
131131
.$if(args.where?.contract, (qb) =>
132132
qb.innerJoin("contracts", "contracts.id", "claims.contracts_id"),
133133
)
134-
.selectAll(); // Select all columns from the claims table
134+
.selectAll("claims"); // Select all columns from the claims table
135135
case "contracts":
136136
return this.db.selectFrom("contracts").selectAll();
137137
case "fractions":

0 commit comments

Comments
 (0)