Question about explicit many to many table

super noob question. i'm using the python client and have the following table setup: model annotators { id Int @id @default(autoincrement()) username String @unique @db.VarChar(150) experiments_annotators experiments_annotators[] } model experiments { id Int @id @default(autoincrement()) name String @unique @db.VarChar(128) experiments_annotators experiments_annotators[] } model experiments_annotators { experiments_id Int experiments experiments @relation(fields: [experiments_id], references: [id]) annotators_id Int annotators annotators @relation(fields: [annotators_id], references: [id]) @@id([experiments_id, annotators_id]) } i'm trying to grab an annotator with a particular username and, in the same query, get the experiment with a particular name. i'm running the following query: result = await client.annotators.find_first_or_raise( where={ 'username': username, 'password': password, }, include={ 'experiments_annotators': { 'include': { 'experiments': { 'where': { 'name': 'test-experiment' } } } but i'm getting a type error when i try to query the name of the experiments. am i doing something wrong?
Solution:
👋 we don’t support the python client. That’s a community managed project. I think their GitHub repo has info for their Discord
Jump to solution
2 Replies
Solution
jonfanz
jonfanz3mo ago
👋 we don’t support the python client. That’s a community managed project. I think their GitHub repo has info for their Discord
Chris Grimm
Chris Grimm3mo ago
ah i see, i'll head over there