Anyone have any idea about this bug?
GitHub
[BUG]: Relations shouldn't enforce array values · Issue #1816 · dri...
What version of drizzle-orm are you using? 0.29.3 What version of drizzle-kit are you using? 0.20.9 Describe the Bug export const table1 = pgTable( 'Table1', { id: text('id').primar...
9 Replies
How else are you to make that kind of query
@jakeleventhal what are you trying to do?
1)
table1Relations
is missing a column in fields and references
2) table2Relations
does not have a table1ItemOne
so typescript is correct in saying it doesn't existmy specific use case is as follows:
a user is able to add a design for a package sticker as well as a package insert. designs can also be used for other things
so in my use case i have
designs.packageStickerSettingId
and designs.packageInsertSettingsId
.
essentially what i want to be able to do is query the user's settings along with the deisgn values for packageSticker and packageInsert by doing a query like
would you mind providing the tables/relations with the actual names you're using? feel free to strip down irrelevant columns
sure, here is the prisma version of the tables that was working:
(aka i could do this query)
here is my drizzle rendition
i didnt include the relations becuase i couldnt get them to work
but what i was trying to do was basically this
perhaps?
although in your prisma schema the relations are for the Branding table?
settings table is actually branding, just named settings to make it easier to understand in this example. i updated my message above
your solution actually works!
great :D
ty