DT
Drizzle TeamSuji
can you Infer relations?
im really loving how drizzle plays well with relations, but im wondering is there a way to get types for relations?
in prisma you can use
Prisma.YourModelGetPayload<{}>
to generate a type with relations, is this possible with infermodel?
i tired the most obvious way and that didnt work
bloberenober•351d ago
Not possible at the moment, but it's a good thing to have, will add it to backlog
ejoo•288d ago
I do it likes this
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
7.4KMembers
View on DiscordWant results from more Discord servers?
More PostssubRows.map is not a functionI am getting a subRows.map is not a function error when adding the "with" parameter to my relationalPostgres's Serial column type doesn't automatically have a defaultHello, when using postgres's `serial` types, and setting them as primary keys, there is an issue curHow to insert into a table without providing valuesI've got the following schema for users in sqlite, it only contains an id, which is an auto incremenDoent infer type in Callback syntax for queryIm querying the users table like this
`db.query.user.findFirst({
where: (user, { eq }) => {
Bug When Trying To Increment A Fieldthis set the field to 0 instead of increasing by one it used to work in other routes
```
await Maximum call stack exceeded with relation to selfI have the following table
```
export const category = pgTable('categories', {
id: serial('id').importing into schema.ts fileHi,
I am using turborepo and I have defined my schema in `packages/schema/user.ts` and in my main AWhat versions of MySQL are supported? I have JSON_ARRAYAGG issues with 5.7 and AWS Aurora ServerlessCan you confirm what versions of MySQL you intend on supporting? Relational queries with joins use J