volcanicislander
Explore posts from serversDTDrizzle Team
•Created by volcanicislander on 10/4/2023 in #help
Inferred Types not picking up Relations
I'm having issues with my inferred types from the "Core Type API" not picking up relations.
I am trying to model a 1-to-Many relationship between
users
and assignments
. A user
can "create many" assignments
. My query looks like this:
And the involved tables and relations from my schema file are defined as:
My type is defined as:
The query properly retrieves the user
under the createdBy
column but the typing still thinks the createdBy
column should be a number and not the embedded user
from the relation. What am I missing here?
For reference, this is in a Remix project using Cloudflare D1.9 replies