[solved] One to many relation not working
I get the error "There is not enough information to infer relation"
Here's (part of) my code
I must be missing something obvious
5 Replies
I'm using postgres btw
It looks like you need to add a
fieldsLangRelations
that specifies a one
relation with fields
https://orm.drizzle.team/docs/rqb#one-to-many
Unless it's a many-to-many, in which case you might need a join tableRelational queries – DrizzleORM
Drizzle ORM | %s
Thank you for the idea. I will try it and see if it works
right now it wouldn't know which fields in
fields
relate to which fields in fields_lang
That makes sense. I thought it would use the
references
part for that. I will see how to fix it
It worked perfectly 💯 Thank you very much!