Studio: Not Enough Info to Infer Relation
https://www.answeroverflow.com/m/1180072254214766632
Running into this issue:
Any ideas? Based on the stack overflow, the suggestion is that the relationship isn't on both sides, but it seems like I do in this case, no?
There's not enough information to infer relation - Drizzle Team
I am trying to use drizzle studio but I'm running into the following issue,
There is not enough information to infer relation "__public__.collectionsTable.tokens"
.
Here's a simplified version of the schema.
```ts
export const tokensTable = mysqlTable(
'tokens',
{
tokenId: varchar('token_id', { length: 255 }).notNul...4 Replies
Hello, @stephen! You have to update your
auditLogsRelations
with this
thanks @solo ! i think i've got dozens of these relations configured incorrectly it seems... can you point me to the docs where i might learn more about this second argument?
The relations docs show examples
https://orm.drizzle.team/docs/rqb#declaring-relations
And the foreign key docs explain the similarities and differences
https://orm.drizzle.team/docs/rqb#foreign-keys
Drizzle ORM - Query
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
Thanks! Now I'm trying to follow the pattern for a
many-to-many
and am getting stuck.
jk
i think i see it 🤦♀️
yup! i got it! 😅
(I was looking at the wrong table's relations ... 😬 )