Skip to content

Commit

Permalink
🐞 fix: unique where types in non recursive mode
Browse files Browse the repository at this point in the history
  • Loading branch information
m1212e committed Jul 24, 2024
1 parent 5c3f1c6 commit e4bbc1a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ generator prismabox {
output = "./generated/schema"
additionalFieldsPlain = ["additional: Type.Optional(Type.String())"]
useJsonTypes = true
allowRecursion = false
}

model Password {
Expand Down
2 changes: 1 addition & 1 deletion src/generators/where.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ export function stringifyWhereUnique(data: DMMF.Model) {
}

return makeIntersection([
wrapWithPartial(uniqueBaseObject),
wrapWithPartial(uniqueBaseObject, true),
makeUnion(
[...uniqueFields, ...uniqueCompositeFields].map(
(f) => `${getConfig().typeboxImportVariableName}.Object({${f}})`,
Expand Down

0 comments on commit e4bbc1a

Please sign in to comment.