Drizzle ORM #7- Many-To-Many Relations ⭐

preview_player
Показать описание
Many-To-Many Relations has Always been tricky but In this episode of Drizzle ORM Comprehensive Course, You will Master how to create Many-To-Many Relations with Drizzle ORM.

--------------------------------------------------

--------------------------------------------------
Other videos you might like:

#DrizzleOrm #Orm #nodejs #nextjs #typescript
Рекомендации по теме
Комментарии
Автор

Is there any way to get postCategories from this
[{category: {name: "sport"}}, ...]
to this
[{name: sport}]?

JohnCanCode
Автор

Thank you so much! I can't wait to see upcoming sections of the course 😍

djesoproducer
Автор

Great video! How can you retrieve the postCategories as a list of strings i.e. ["Sport", "Economics"]?

rdx
Автор

You are a great teacher, ♥ I am waiting for next sections.

gautam_vaishnav
Автор

How can I get all the post with a particular category Id??

Johnny-rfiu
Автор

Thank you for this videos!

Are still going to create the video on how to insert a many-to-many relation?

edwardspresume
Автор

Hi, loved the tutorial series, any updates on the seeding video?

PTBKoo
Автор

I have one question, I cant use the query stuff I have a document Table named document, and it's in the database with the migration tool. Now i try to use db.query.document and it can't find the document table but why? i have my schema split up in multiple files because it's easier to manage and tried to import it into the drizzle(connection, {schema}) and couldn't make it work do you have any tips on how to handle the multi file mode?

dustsucker
Автор

@10:51 - how are you querying categories 'with: {posts:true}', without having to reference the join table?

shouldn't it be: `await with:{ postOnCategories: { with: { posts:true } } } })`

I literally can't seem to avoid referencing the otherside of the many to many relationship without the join table?

Still a great video, I keep coming back to it over the docs! :)

nickwoodward
Автор

Hello! I am here again. I was wondering how we can implement the prepare statement for updating data with drizzle. I would be obliged if you could provide us some solutions. Thank u.

lenghak_hok
Автор

in need to keep schema by table separately in one folder schemas with realtions between them, but drizzle cannt them if i wanna relations i need place all of them to one file

steel
Автор

How to fetch those posts which don't have any category

Manish___Choudhary
Автор

The .refernces() function is actually all I needed in the past to define relations. Why do I need these unhandy relations objects for every relation?

F.E-ps
Автор

also the primaryKey function is now deprecated apparently: `primaryKey({columns:[table.id1, table.id2]})`

nickwoodward
Автор

Many to Many does not really work, at least, in an orm-ish way... the select returns the associations table rows and not the associated category object. It a bit messy to work with those multiple "with" and "columns". But, it is my own opinion.

LucaStasio
Автор

loving the course, but drizzles way of dealing with relationships is so verbose compared to what I remember in sequelize

nickwoodward
Автор

Great vid. Im watching, following along, and going back over certain parts to see why my `db.query` only has `$drizzleTypeError`

JohnCanCode