You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 9, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: src/select-query-parser/result.ts
+17-3Lines changed: 17 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -401,12 +401,26 @@ type ProcessSpreadNode<
401
401
? ResultextendsSelectQueryError<infer E>
402
402
? SelectQueryError<E>
403
403
: ExtractFirstProperty<Result>extendsunknown[]
404
-
? {
405
-
[KinSpread['target']['name']]: SelectQueryError<`"${RelationName}" and "${Spread['target']['name']}" do not form a many-to-one or one-to-one relationship spread not possible`>
406
-
}
404
+
? // Spread over an many-to-many relationship, turn all the result fields into arrays
405
+
ProcessManyToManySpreadNodeResult<Result>
407
406
: ProcessSpreadNodeResult<Result>
408
407
: never
409
408
409
+
/**
410
+
* Helper type to process the result of a many-to-many spread node.
411
+
* Converts all fields in the spread object into arrays.
0 commit comments