11 Replies
Looks good (if these relations exist). Any particular error?
well, the catch-part of a try-catch-block is entered and run.
user is never set
Error: There are multiple relations between "friendships" and "users". Please specify relation name
here
this is the error
this is the data model
you will be able to see what the problem is
š
I don't know it ...on both relations user and anotherUser, just add a relationName :p
could you please show me an example?
relationName? I am not used to it
yes
when you reference the same columns, you have to add a unique
relationName
(what you want here)and then?
should I reset the database?
or what?
because the error does not disappear
no but I am creating an example based on your snippets
thank you
are you having some success?
https://drizzle.run/xnsii9efjoyhovvspftc3j4w
yeah sorry I was busy haha
I have just reworded some stuff but I hope it helps
your seems to be in this use case https://orm.drizzle.team/docs/rqb#disambiguating-relations
thank you, but now I have the error:
Cannot read properties of undefined (reading 'referencedTable')
...
ok
i solved it
thank you again.wonderful!