Skip to content

Commit d6626b4

Browse files
committed
fix: isOneToOne
1 parent fb11ed8 commit d6626b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/server/templates/typescript.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ export const apply = async ({
154154
setofOptionsInfo = `SetofOptions: {
155155
from: ${JSON.stringify(typesById[fn.args[0].type_id].format)}
156156
to: ${JSON.stringify(fn.return_table_name)}
157-
isOneToOne: ${Boolean(fn.returns_multiple_rows)}
157+
isOneToOne: ${Boolean(!fn.returns_multiple_rows)}
158158
isSetofReturn: true
159159
}`
160160
}
@@ -176,7 +176,7 @@ export const apply = async ({
176176
setofOptionsInfo = `SetofOptions: {
177177
from: "*"
178178
to: ${JSON.stringify(fn.return_table_name)}
179-
isOneToOne: ${Boolean(fn.returns_multiple_rows)}
179+
isOneToOne: ${Boolean(!fn.returns_multiple_rows)}
180180
isSetofReturn: ${fn.is_set_returning_function}
181181
}`
182182
}

0 commit comments

Comments
 (0)