thebjorn
thebjorn
Explore posts from servers
DTDrizzle Team
Created by thebjorn on 6/4/2024 in #help
I cant get Drizzle with Queries to work...
Nevermind, figured it out. I needed to initialize db with both schema and relations:
import * as schema from './schema.js'
import * as relations from './relations.js'
const client = postgres(process.env.POSTGRES_URL)

export const db = drizzle(client, {
schema: {
...schema,
...relations,
}
});
import * as schema from './schema.js'
import * as relations from './relations.js'
const client = postgres(process.env.POSTGRES_URL)

export const db = drizzle(client, {
schema: {
...schema,
...relations,
}
});
3 replies
DTDrizzle Team
Created by thebjorn on 6/4/2024 in #help
I cant get Drizzle with Queries to work...
PS: I can get the records using .leftJoin, but the with: syntax seemed like an easier transition path from prisma's include: syntax...
3 replies