Doctrine Many to Many Relationship With Extra Fields | Columns. Learn Symfony Doctrine (2021).

  Рет қаралды 11,448

Gary Clarke

Gary Clarke

Күн бұрын

Пікірлер: 37
@15121Duncan
@15121Duncan 2 жыл бұрын
This video was exaclty what i was looking for. It couldn't be better for me. Thank you so much!
@GaryClarkeTech
@GaryClarkeTech 2 жыл бұрын
Glad it helped!
@dmitryskvortsov6489
@dmitryskvortsov6489 2 жыл бұрын
thank you for straightforward and easy explanation
@GaryClarkeTech
@GaryClarkeTech 2 жыл бұрын
You are welcome!
@ricohumme4328
@ricohumme4328 3 жыл бұрын
Hi Gary, thanks for this in-depth video. In the previous video leading to this one you mentioned compound foreign keys, which you forget to implement here. Current code would allow for user to have a membership to an already existing interest group at different points in time. Regarding your question at the beginning of the video, I'm currently keeping myself busy with testing the application, which is how I found your channel. Keep it up.
@GaryClarkeTech
@GaryClarkeTech 3 жыл бұрын
I can't believe I forgot that! No-ones ever pointed it out before so thanks! I'll try to incorporate compound keys somewhere in the stuff I'm currently working on.
@aitorfernandez9958
@aitorfernandez9958 3 жыл бұрын
@@GaryClarkeTech Thanks for the video, very interesting and insightful, really. But as Rico pointed out, it is quite important to have the foreign key constraints, since otherwise as he said we can't have unicity in the relations. Have you covered this anywhere? If so, (or if not), can you please point me in the right direction? Thank you!
@GaryClarkeTech
@GaryClarkeTech 3 жыл бұрын
@@aitorfernandez9958 Hey Aitor, I've not covered compound keys using Doctrine anywhere yet. The only other person that I can imagine would cover this kind of thing is Ryan Weaver who does SymfonyCasts. You can check his stuff or ask him on twitter or something.
@aitorfernandez9958
@aitorfernandez9958 3 жыл бұрын
@@GaryClarkeTech Hey Gary, thank you very much for your response. I did some research on my own after being left with the doubt, and actually implemented what I understand might be a valid approach to these compound primary keys. For anyone interested, I annotated every id i wanted to be part of the compound primary key with @ORM\Id. In my case I had two, a guid and an int, and Doctrine generated the constraints just fine, so I believe this would work for similar needs.
@mairahs16
@mairahs16 2 жыл бұрын
Hi Gary 😊 very useful..thank you
@GaryClarkeTech
@GaryClarkeTech 2 жыл бұрын
Glad it was helpful!
@Michel2003g
@Michel2003g Жыл бұрын
maby you could make the many to one one to many inside the terminal?
@MrWilde
@MrWilde 3 жыл бұрын
Hey Gary, would love to see more testing with projects
@GaryClarkeTech
@GaryClarkeTech 3 жыл бұрын
Great Robert. Lot of testing the the eCommerce project I'm doing.
@abdelilahaassou6333
@abdelilahaassou6333 3 жыл бұрын
Thank you, Gary, for this great videos. I would like to see more about APIs and projects (back+front).
@GaryClarkeTech
@GaryClarkeTech 3 жыл бұрын
More to come!
@proFFessor90
@proFFessor90 3 жыл бұрын
hi, it would be nice to see a video on creating doctrine custom types and dql methods (ilike for postgres)
@ЕвгенийБатулин-г9з
@ЕвгенийБатулин-г9з 2 жыл бұрын
Garry! Thank you for the content. It's useful. If you are interested in my opinion, then for me, as a beginner, the interaction of the api with frontend is interesting. Thank you for your interest.
@GaryClarkeTech
@GaryClarkeTech 2 жыл бұрын
Thanks for the tips!
@RomanA-p6h
@RomanA-p6h 2 жыл бұрын
You just have the best Symfony channel !!! You do not take students?
@GaryClarkeTech
@GaryClarkeTech 2 жыл бұрын
Thanks a lot! The videos take up all of my time so there's not enough time for individual students atm
@artan1023
@artan1023 3 жыл бұрын
Hi Gary, that’s is a great tutorial, would it be possible to add how to create symfony forms with many-to-many relationship with extra fields?
@GaryClarkeTech
@GaryClarkeTech 3 жыл бұрын
Hi Artan..it could be something I consider in the future. Do you have a particular scenario in mind?
@OKYPC
@OKYPC 3 жыл бұрын
please @@GaryClarkeTech maybe an basic stocks scenario ([ORDER (id, date, supplier)]-[ORDER-PRODUCT(id, order_id, product_id, quantity, price)]-[PRODUCT(id, name, category)])
@GaryClarkeTech
@GaryClarkeTech 3 жыл бұрын
@@OKYPC Thanks..let me think about it 👍
@klesk44
@klesk44 Жыл бұрын
@@GaryClarkeTech hello, 2 years later, does this is out somewhere ? Thanks
@杨志-n6z
@杨志-n6z Жыл бұрын
add MemmberShip entity is the only way?
@GaryClarkeTech
@GaryClarkeTech Жыл бұрын
It's the only way I've ever done it using Doctrine. There might be another way but I've never explored it. ChatGPT might be able to suggest an alternative.
@lazarvukosavljevic9575
@lazarvukosavljevic9575 Жыл бұрын
Your videos are awesome, helped alot, thank you alot, It would be nice to increase mic for 20%
@GaryClarkeTech
@GaryClarkeTech Жыл бұрын
Thank you 🙏Mic is a lot better in my later recordings...this is quite an old one
@tianadede349
@tianadede349 3 жыл бұрын
thanks for videos ( ca you do creating Bundles ) ?
@GaryClarkeTech
@GaryClarkeTech 3 жыл бұрын
Maybe some time in the future. Thanks for the suggestion 👍
@johnfawcett3503
@johnfawcett3503 3 жыл бұрын
Hi Gary, I found this and the other videos very informative - thank you very much. Is there a chance you could in future put together a video covering Symfony Forms and how you would implement the many to many relationship there? An example would be having a master (say for example user) and have the ability to select or tick items in a selectbox (example training courses completed) and have the join entity / table reflect the selected items? Would I have to resort to using Javascript to handle it or could it be done using forms?
@GaryClarkeTech
@GaryClarkeTech 3 жыл бұрын
Thanks John..I'm glad you find them helpful. I've not tried your scenario using the Symfony Form component before but when I've needed inputs which relate to multiple entities of the same type, I've been able to use the name attribute like this name="course[1]" where the 1 would be a dynamically rendered id. I've done this with test inputs a few times but can't recall doing with checks .. so might be a bit more fiddly but it can be done without js. Check Matt's tutorial for ideas mattstauffer.com/blog/a-little-trick-for-grouping-fields-in-an-html-form/
@johnfawcett3503
@johnfawcett3503 3 жыл бұрын
@@GaryClarkeTech Thanks Gary, that's given me something to look into - will take a look further and see what I can come up with! Cheers John
Doctrine ORM Many to Many Relationship
10:26
Gary Clarke
Рет қаралды 7 М.
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 30 МЛН
So Cute 🥰 who is better?
00:15
dednahype
Рет қаралды 19 МЛН
No BS SOLID Principles
51:06
Gary Clarke
Рет қаралды 3 М.
Netflix Removed React?
20:36
Theo - t3․gg
Рет қаралды 75 М.
Pete Sampras vs Patrick Rafter 1998 US Open SF Highlights
20:08
JOTennisVid
Рет қаралды 97 М.
How to Correctly Define Many-To-Many Relationships in Database Design
7:07
Doctrine ORM One to Many Relationship (bidirectional)
16:04
Gary Clarke
Рет қаралды 17 М.
Testing PHP - Up and running with PHPUnit
30:42
Gary Clarke
Рет қаралды 50 М.
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 30 МЛН