db.query error with relation

I have created a schema.ts, with two tables, with a one-to-one relationship. I have also create the "relation".

In my index file, I get an error with the following code

const singleMatch = await db.query.matches.findMany({
        where: eq(matches.matchID, 'g123245'),
        with: {
          matchDetails: true,
        },
      });

saying "Property 'matches' does not exist on type '{}'"
Was this page helpful?