Why can't you use `with` with FK relations?
I'd like to be able to use the query builder
with
to get relations defined by FK constraints. I feel like this should be available by default, rather than having to specify every possible relation that is already defined by FKs.
I understand that this is an opt-in feature and you can define relations outside the scope of standard DB mechanisms, but FKs are used to formally define and enforce relations in the DB and (imo) should be automatically applied to the relations.
Is the only way to accomplish this to define "relations" for all of these? Appreciate the insight and have been really enjoying the experience transitioning from Prisma to Drizzle so far! ๐2 Replies
Might be worth opening a GH issue for this.
GitHub
[FEATURE]: Foreign Keys are automatically treated as relations ยท Is...
Describe what you want The documentation states pretty explicitly that relations do not affect the database schema in any way and do not create foreign keys implicitly. While I think that is correc...