How to access multiple relations in query
Hi Team
Recently i working with drizzle in my personal project.
so
i have three tables property, content and price.
each property will related with one content and one price
for the price i already define the schema in my schema.ts
but then i cannot price table in my +page.server.ts (im using sveltekit) and only content table is accessible in my vscode autocomplete
3 Replies
Because:
is actually a
property
relation (see relations(property, ...)
, while:
is a price
relation.
You need to fix contentRelations
and create a new propertyRelations
that references both content
and price
yep, i just realized that
thank you for helping me
now everything working perfectly