File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -376,6 +376,7 @@ type ProcessEmbeddedResourceResult<
376
376
relation : GenericRelationship & {
377
377
match : 'refrel' | 'col' | 'fkname' | 'func'
378
378
isNotNullable ?: boolean
379
+ referencedRelation : string
379
380
}
380
381
direction : string
381
382
} ,
@@ -385,7 +386,11 @@ type ProcessEmbeddedResourceResult<
385
386
ClientOptions ,
386
387
Schema ,
387
388
Resolved [ 'referencedTable' ] [ 'Row' ] ,
388
- Field [ 'name' ] ,
389
+ // For embeded function selection, the source of truth is the 'referencedRelation'
390
+ // coming from the SetofOptions.to parameter
391
+ Resolved [ 'relation' ] [ 'match' ] extends 'func'
392
+ ? Resolved [ 'relation' ] [ 'referencedRelation' ]
393
+ : Field [ 'name' ] ,
389
394
Resolved [ 'referencedTable' ] [ 'Relationships' ] ,
390
395
Field [ 'children' ] extends undefined
391
396
? [ ]
You can’t perform that action at this time.
0 commit comments