Join Without FK Constraint #1194
-
Is there a way to perform joins on tables that don't have explicit foreign keys in the database? Our database doesn't make use of foreign keys. When I try to perform joins using sqlboiler, it throws an error
The error is expected, but is there a (relatively simple) way to work around this? If not, I would either have to add foreign keys to the db (which I want to avoid), or use a different query builder/ORM. For example, is there some way to give a list of virtual foreign keys to sqlboiler? Thanks! 😄 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I don't understand the question. When building a query, just like with regular SQL, you can do joins to other tables. e.g.: qm.InnerJoin()
qm.LeftJoin()
// e.t.c. This has nothing to do with foreign keys |
Beta Was this translation helpful? Give feedback.
I don't understand the question. When building a query, just like with regular SQL, you can do joins to other tables. e.g.:
This has nothing to do with foreign keys