Closed jansedlon closed 4 months ago
Hey, sorry for another issue :) My colleague found your package so i'm trying to integrate it.
We have a an implicit M:N relation
model Country { id String @id @default(cuid()) // ... currencies Currency[] } model Currency { code String @id @unique countries Country[] // ... }
The main thing here is that Currency's id is code.
Currency
code
This is the relations that this package generates. See the comment
export const countriesToCurrenciesRelations = relations( countriesToCurrencies, (helpers) => ({ country: helpers.one(countries, { fields: [countriesToCurrencies.A], references: [countries.id], }), currency: helpers.one(currencies, { fields: [countriesToCurrencies.B], references: [currencies.id], // Property 'id' does not exist on type. It should be `code` }), }), );
That's new, I think this should be an easy fix, brb
@jansedlon could you please try again with prisma-generator-drizzle@0.7.3-adc7351?
prisma-generator-drizzle@0.7.3-adc7351
@farreldarian tsc doesn't complain anymore, thanks a lot!
tsc
Hey, sorry for another issue :) My colleague found your package so i'm trying to integrate it.
We have a an implicit M:N relation
The main thing here is that
Currency
's id iscode
.This is the relations that this package generates. See the comment