No query result types

When i'm doing this.conn.query.organizations.findMany({}) there is no autocomplete for organizations columns, it shows only relations (restaurants) this.conn is PostgresJsDatabase<typeof schema> But if i specify
{
columns: { id: true },
}
{
columns: { id: true },
}
, it shows id in autocomplete How can I fix this, I want to see all fields in autocomplete
No description
No description
5 Replies
rexydye
rexydyeOP•2y ago
Is this a bug?
MAST
MAST•2y ago
You don't really need to define the coonection type. Drizzle should be able to infer everything. Can you send the code for creating the drizzle instance?
rexydye
rexydyeOP•2y ago
No description
MAST
MAST•2y ago
This looks good to me 😄 Maybe there's something wrong in the schema definition?
rexydye
rexydyeOP•2y ago
I found a way to fix this If i specify { with: {} } autocomplete works good

Did you find this page helpful?