Тёмный

Doctrine ORM - PHP Entities & Data Mapper Pattern - Full PHP 8 Tutorial 

Program With Gio
Подписаться 55 тыс.
Просмотров 36 тыс.
50% 1

Опубликовано:

 

27 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 147   
@Armando-px8hi
@Armando-px8hi Год назад
The lessons are going hard already for me, these are the concepts I have never reached while learning PHP. Thanks a lot for not missing anything in your way to make us great.
@ProgramWithGio
@ProgramWithGio Год назад
You're welcome. Keep up the good work 💪
@karam0101
@karam0101 Год назад
Great video as always, thank you. Note: EntityManager::create() is deprecated We can use : $entityManager = new EntityManager( DriverManager::getConnection($params), ORMSetup::createAttributeMetadataConfiguration([ __DIR__ . '/Entity', ]) );
@ProgramWithGio
@ProgramWithGio Год назад
Yup, adjusted it later on
@benderbg
@benderbg 19 дней назад
Doctrine has more deprecated functions than feudalism in Europe. Another wonderful lesson!
@ProgramWithGio
@ProgramWithGio 18 дней назад
This is funny :D
@marcitrixie
@marcitrixie 18 дней назад
the hell hahaha
@bakosyy
@bakosyy 10 месяцев назад
Doctrine has lots syntax to write, but at the same time it is satisfying that we see how ORM is intended to work. Thanks for the video.
@ProgramWithGio
@ProgramWithGio 10 месяцев назад
Glad you like it, you're welcome
@YouTrup163
@YouTrup163 2 месяца назад
Use a symfony maker to speed up the process. Really makes the difference
@cpanagoulias
@cpanagoulias 2 года назад
Once again, great content, excellent presentation! Can't wait for the next one!
@ProgramWithGio
@ProgramWithGio 2 года назад
Thank you 🙌 💙
@hassamulhaq7762
@hassamulhaq7762 2 года назад
I used Propel ORM it's really awesome, I also research on Doctrine ORM but not used yet. This video is a deep overview on Doctrine ORM.
@ProgramWithGio
@ProgramWithGio 2 года назад
Haven't used Propel ORM, looks interesting.
@ercank1137
@ercank1137 Год назад
Thank you bro! This helps me. This week I start with new company and they use this. Thnx!
@ProgramWithGio
@ProgramWithGio Год назад
Happy to hear that, good luck at the new company 🤞🤞
@ercank1137
@ercank1137 Год назад
@@ProgramWithGio thank you bro!
@skv1991
@skv1991 2 года назад
Perfect video! Thank you so much for this hard work! The presentation is really cool! Always wanted to share the knowledge in same style!! Always have problems with this associations... Often have cases and problems in them to manage and map entities, when I have three linked entities like: Restaurant (OneToMany unidirectional) -> RestaurantPaymentType[] (OneToOne? unidirectional) -> PaymentType And the middle one have additional attributes, like ordering, DeliveryType (a enum class) Other example: Restaurant -> RestaurantProductCategory (has ordering, active flag) -> ProductCategory and in UI, you can choose, which Restaurant have which ProductCategories. (multi-select dropdown) The hardest part for me, is when I trying to figure out how to solve these relations updating. Creation is simple, as in your video, but when I trying to update, inverse side items (add/remove) - I have troubles and error. Either have too complex saving code, or have DB Errors for duplicating unique indexes or PK (One restaurant have only one payment type for one delivery type, so you can't add multiple same payment types for delivery and pickup real life methods) Some of my friends tell me about using removeOrphans attribute, to tell to Doctrine, that inverse side entity I want to remove - is only used for this one owning entity, and no one else referenced to it. So I really need to understand this case - how to organize proper mapping and saving (update inverse side entities - add/remove/[update]). I have existed PaymentTypes (online payment, cash, bank card) - entity in DB. 1) When I'm saving new Restaurant - I created an RestaurantPaymentType entities (in loop), link them to PaymentTypes and Restaurant, adding ordering and some other attributes. All saved correctly. 2) When I'm updating available restaurant payment types, say removed/or added one, then I need to realize, the diff between already existed entities, and new added/removed. Do I need to do this all manually (calculate diff, have multiple arrays - whta to add, what to remove, and exclude existed items), or I can somehow work only with ArrayCollection state, and sync them to DB state? 3) When I'm removing existed Restaurant, I can just use cascade operations, to delete only RestaurantPaymentType, but not PaymentType entity (just relation entity with additional fields). Well this also work correctly. Mainly have troubles with case number 2. I have a lot of pain doing this. And really need help from those, who understand all the process of managing mapped entities. (sorry if my English is bad) Really glad to found this helpful video and channel. Like Doctrine so much, but really need to understand how it works. Thank you in advance, if you reached this part of comment! :)
@ProgramWithGio
@ProgramWithGio 2 года назад
Thank you. It's a bit hard to help without seeing the code, I don't exactly understand the question or the problem, maybe if you showed me some part of code I could understand it better. You can ping me on Twitter.
@kvanca2330
@kvanca2330 Год назад
Great content as always. First time i see doctrine in action and i think eloquent is more user friendly.
@ProgramWithGio
@ProgramWithGio Год назад
Thank you. Yes Laravel Eloquent is much easier & has better Developer Experience.
@omaryahia
@omaryahia 8 месяцев назад
this is beautiful and clear🌷Thank you 🌟
@ProgramWithGio
@ProgramWithGio 7 месяцев назад
Thank you
@berkay8467
@berkay8467 2 года назад
great tutorial, thanks for everything! Can't wait for the final..
@ProgramWithGio
@ProgramWithGio 2 года назад
Thank you 🙌
@joepersonbelgica3980
@joepersonbelgica3980 3 месяца назад
The best. Thanks
@ProgramWithGio
@ProgramWithGio 2 месяца назад
Thanks
@bakosyy
@bakosyy 10 месяцев назад
Hey, the $items property is typified with `Collection` class. However, we are instantiating it with `ArrayCollection` class. Is it the case of Contravariance when we typehint property with more general type?
@ProgramWithGio
@ProgramWithGio 9 месяцев назад
Collection is an interface that ArrayCollection implements
@ItsDigiUtime
@ItsDigiUtime Год назад
Does Yii2 and Laravel use the same pattern? Are there any differences the way ORM is implemented in these frameworks?
@ProgramWithGio
@ProgramWithGio Год назад
I don't know much about Yii2 so not sure
@Wane-maxx
@Wane-maxx Год назад
Nice video bro
@ProgramWithGio
@ProgramWithGio Год назад
Thank you 🙌
@JACKoPL
@JACKoPL Год назад
Few monts later must instal doctrine/dbal 2.x. v3 have problem with install orm. Maybe I only have this problem. Doctrine\ORM\Tools\Setup at doctrine/orm:2.12 is deprecated... now ORMSetup.
@ProgramWithGio
@ProgramWithGio Год назад
Yes, use the new class, old one was deprecated,
@rickstrafy4870
@rickstrafy4870 Год назад
You don't need to set name to created_at and invoice_number, it's auto-translated (camelCase snake_case)
@ProgramWithGio
@ProgramWithGio Год назад
Don't think that's true, at least not according to the documentation & I get an error if I don't map it. Can you share a link to the documentation that states it works this way? Maybe a configuration that I need to enable.
@rickstrafy4870
@rickstrafy4870 Год назад
@@ProgramWithGio I have sent you a link to a source code of extension I'm using where strategy is set to UnderscoreNamingStrategy::class by default, but youtube probably deleted that comment, it's at github /contributte/doctrine-orm/blob/master/src/DI/OrmExtension.php at line 51.
@ProgramWithGio
@ProgramWithGio Год назад
@@rickstrafy4870 Thank you, did not know about that extension. It would not work in our setup without setting the naming strategy in container bindings where we configure the entity manager. But is definitely a handy extension, thank you 🙌
@ProgramWithGio
@ProgramWithGio Год назад
Posting the link to the docs here hoping RU-vid won't remove it: www.doctrine-project.org/projects/doctrine-orm/en/2.14/reference/namingstrategy.html#underscore-naming-strategy
@delisandor5337
@delisandor5337 Год назад
really cool tutorial
@ProgramWithGio
@ProgramWithGio Год назад
Thank you
@truthteachers
@truthteachers Год назад
Up to timestamp 17:29, it was a lot to consume. From what i see is that we are doing so much thinking, remembering, understanding and coding just to get what we could do simply by using PDO. I am a business solution developer and i need to get solutions out to the users quickly. Doing all these codes, i estimate it would take 3 times more time, effort, documentation and team understanding (for later support). Too much intertwining which would make debugging so complex a nightmare for a third person (support unit). Perhaps all this knowledge would serve best to people who want to develop some sort of custom frameworks similar (Laravel, Codeigniter etc.). I am not saying its wrong but definitely say it should only be moderately used for business solution development. This is just my feeling up to this point. Perhaps this may change when we do the P series in the course. Definitely a great eye-opener on what PHP can do and realized that we should never compare PHP with the likes of Js frameworks.
@ProgramWithGio
@ProgramWithGio Год назад
Sure you can do a lot with just PDO, however ORMs help by alot and actually make developing apps much easier and faster. Symfony uses doctrine & a lot of enterprise level apps use it. Laravel has eloquent which is also ORM and plenty of startups as well as enterprise level apps use it. To me it's faster to whip out a working solution with an ORM than without it. But that can be different for everyone, if plain PDO works for you then stick with it, it also depends on the size of the application. For small apps ORM might be overkill
@truthteachers
@truthteachers Год назад
@@ProgramWithGio Agreed. We develope apps in small bits. Mostly headless cms, batch jobs and apis supporting our back-end CRM and transaction systems. Front-end, we are now strategizing on Vuejs and Alpinejs (looking into Astro Build). If i have to create a large app, i might as well stick to Codeigniter 4 (smaller and efficient footprint). Laravel in my opinion is overloaded. Thank you for your advise and comment.
@truthteachers
@truthteachers Год назад
At timestamp 20:31, when the invoice item were displayed, i see there is invoice_id field has the id of the invoice just created. The question is, how did the value get inserted when we did not set this value at addItem() method?
@ProgramWithGio
@ProgramWithGio Год назад
We are calling addItem on invoice entity, that basically takes care of it. It sets up the relationship between invoice & item.
@sergeykonov4562
@sergeykonov4562 11 месяцев назад
Thanks.
@ProgramWithGio
@ProgramWithGio 11 месяцев назад
You're welcome
@iraqwin9889
@iraqwin9889 Год назад
i have a problem, which is when i set one entity everything goes well , but when i make another one it shows the error : No identifier/primary key specified for Entity "SomeEntity" i've been tried every solution and didn't work
@ProgramWithGio
@ProgramWithGio Год назад
Did you add primary key identifier to your id property? #[Id] attribute or via annotation
@iraqwin9889
@iraqwin9889 Год назад
@@ProgramWithGio when i set it by the annotation mode it works but with attriute mode it wont
@ProgramWithGio
@ProgramWithGio Год назад
@@iraqwin9889 can you share your code? Put it on GitHub
@mehdi-vl5nn
@mehdi-vl5nn Год назад
Does this mean the only difference between a database abstraction layer and ORM is in the definition of the schema? By the way, I didn't understand the difference between a database abstraction layer and data access layer. They seemed the same to me in terms of usage. what is the actual difference between them?
@ProgramWithGio
@ProgramWithGio Год назад
DBAL (Database Abstraction Layer) provides unified/standard API to access various DB systems like MySQL, SQLite, etc. It does not handle any mapping or anything like that. ORM does the mapping part, it basically allows you to interact with your database in an object oriented way, hence the name "Object-Relational Mapping". PDO for example can be thought of as DBAL but it is not, PDO is more like a Database **Access** Abstraction Layer, just lets you run queries across multiple DB systems but does not give you query builder or anything like that.
@mwaas
@mwaas Год назад
more than amazing content
@ProgramWithGio
@ProgramWithGio Год назад
Thank you 🙌
@bijianwu5124
@bijianwu5124 Год назад
thanks again for the great content, by the way, is Doctrine recommended when compared to Raw PDO? how's its performance when compared to Raw PDO? have you used Doctrine a lot in your production project?
@ProgramWithGio
@ProgramWithGio Год назад
Raw queries are usually faster. Though the performance hit by the ORM is dependent on how you set it up and use. You do get a lot of flexibility and better structure though when working with Entities and ORM. I've used Laravel's ORM in production alot and haven't had any performance issues. I haven't used Doctrine a lot in production but when Ive used it I didn't face performance problems either.
@bijianwu5124
@bijianwu5124 Год назад
@@ProgramWithGio thanks for it, that helps a lot
@Wane-maxx
@Wane-maxx Год назад
This remind me to Hibernate
@ProgramWithGio
@ProgramWithGio Год назад
👍👍
@DigitaSkills101
@DigitaSkills101 2 года назад
Great, I understood to use both dbal and orm but orm also have dbal functions so do i really need to use dbal? Or In which cases I should use dbal and orm
@ProgramWithGio
@ProgramWithGio 2 года назад
If you want to make use of entities and ORM then you use the ORM one. If you don't need entities and just need simple query builder then go for DBAL
@DigitaSkills101
@DigitaSkills101 2 года назад
@@ProgramWithGio Thanks it really saves me the trouble
@memack101
@memack101 2 года назад
Thank you
@ProgramWithGio
@ProgramWithGio 2 года назад
💙
@therfc
@therfc 8 месяцев назад
It breaks my heart to see Decimal(10,2) being casted to float. But great video regardless!
@ProgramWithGio
@ProgramWithGio 8 месяцев назад
For simple projects that's fine in my opinion but yea in general I agree to avoid using floats for monetary values
@rafageist
@rafageist 8 месяцев назад
Why doesn't Doctrine persist the invoice items, without needing to specify "cascade persist" or call the ->persist() method? Doctrine forces me to enter one of those two options and only one? The exception is unnecessary because Doctrine can persist cascading by default, if none of the options are explicit, or simply do nothing. If the "invoice" entity does not depend on the existence of the items, the invoice can be created and the items wait. In another case, if my model says that for an invoice to exist there must be at least one associated item and I am creating it, I can avoid the instruction that the item must be created with the invoice
@ProgramWithGio
@ProgramWithGio 7 месяцев назад
Doctrine was designed to be explicit and predictable, less magic going on.
@rafageist
@rafageist 7 месяцев назад
@@ProgramWithGio It seems redundant to specify this instruction twice; the initial setting should be sufficient. In computing, the "cascade persist" command should inherently imply a single, clear directive to Doctrine. This redundancy feels counterproductive and potentially introduces confusion. In computer science, the magic not exists.
@zmOe1
@zmOe1 2 года назад
thank u
@ProgramWithGio
@ProgramWithGio 2 года назад
🙌🙌
@burnzie743
@burnzie743 4 месяца назад
In the Invoice example, do you need to have a reference to the Invoice in the Item class? I wouldn't want it in there since it's not needed; the Invoice is the aggregate root, so that's the object that gets passed around and is worked with, NOT the Item. You get to the Items through the root Invoice object. So can you just have the 1:m set up in the Invoice? Or would I have to do some custom mapping somewhere if I wanted it that way, such as in the save and find methods of the repository?
@ProgramWithGio
@ProgramWithGio 2 месяца назад
You could have that setup, it depends on how you use it within your app logic
@joellopescunhadesouza8617
@joellopescunhadesouza8617 2 года назад
Awesome content! But the relationship between Invoice and Invoice Items shouldn't be many to many? Many items can be associated with many different Invoices(Not just one) and many Invoices can be associated with many items.
@ProgramWithGio
@ProgramWithGio 2 года назад
Thank you. No it shouldnt be many to many because you dont want to have same line item belong to multiple invoices, that would cause some nasty bugs. An invoice item belongs to just one invoice
@joellopescunhadesouza8617
@joellopescunhadesouza8617 2 года назад
@@ProgramWithGio Ok.But I thoguht that "item" refers to a type of item/product. e.g. If an invoice have a pepperone pizza as one of its items, another invoice can't have a pepperone pizza as well? Creating the same item "pepperone pizza" again for new invoices wouldn't be redundant? But I might not clearly understood what is an invoice item in this context.
@ProgramWithGio
@ProgramWithGio 2 года назад
@@joellopescunhadesouza8617 Item is a row in invoice, it contains the description, quantity & price and invoice can be composed of multiple items, its like a line item. If you google invoice template you will see what I mean. To your example, item would be more closer to pizza slice, pizza can have many slices but that specific slice belongs only to that one pizza. Invoice can have pepperoni pizza as an item that was charged $14.99 for example for that item, now that specific row belongs only to that invoice, sure other invoices can have pepperoni pizzas as well but they would not necessarily be the same price right? Maybe some would be with a discount & so on. So each row on the invoice item is unique to that invoice.
@joellopescunhadesouza8617
@joellopescunhadesouza8617 2 года назад
@@ProgramWithGio Got this now, thank you very much!
@joellopescunhadesouza8617
@joellopescunhadesouza8617 2 года назад
I thought that it was referring to the product concept. For exemple, we could have a Item/Product table representing the inventory of items. If that was the case, the invoice item would be the table representing the relationship n:n between an Invoice and a type of item, containing the price which the item was sold, the quantity, amount, etc. Am I right? I know this don't have much to do with the Doctrine, but thank you very much for your attention! God bless you man
@AngelinCalu
@AngelinCalu 2 года назад
Great job with the video. I really dislike the Doctrine ORM ways of linking data through the attributes in those # comments.
@ProgramWithGio
@ProgramWithGio 2 года назад
Thank you. I like it. I prefer attributes over docblocks & config files
@AngelinCalu
@AngelinCalu 2 года назад
I believe I remember there was a package that would allow laravel users to do the same, however, it was never that popular. I believe that comments should never have any effect on the code functionality, regardless of programming language, framework, or whatever else.
@ProgramWithGio
@ProgramWithGio 2 года назад
@@AngelinCalu I agree, that's why I dislike docblocks. Attributes are not comments though, it's native support to add metadata
@AngelinCalu
@AngelinCalu 2 года назад
​@@ProgramWithGio In this case isnt't it just a convention? I've seen projects where one-line comments would only start with `#`, and the linter would just convert `//` to `#`. Maybe I'm missing something when you say "native support".
@ProgramWithGio
@ProgramWithGio 2 года назад
@@AngelinCalu attributes were added in PHP 8, it's structured & proper way to add metadata to the classes/methods/properties. It's not just a PHP thing, it exists in other languages as well. I have a video about attributes in this series, check it out. By native support I meant that prior to attributes we had to use comments like docblocks to add metadata, now there is native attributes support as of PHP8
@constantinci
@constantinci 2 года назад
Great content. What else can I say ?😃
@ProgramWithGio
@ProgramWithGio 2 года назад
Thank you 🙌
@delisandor5337
@delisandor5337 Год назад
if all authors on udemy would like him....
@ProgramWithGio
@ProgramWithGio Год назад
💙💙
@hrefamid9563
@hrefamid9563 2 года назад
How do cascade persist and remove work on a OneToOne and ManyToMany relationship?
@ProgramWithGio
@ProgramWithGio 2 года назад
Check orphan removal section in the docs: www.doctrine-project.org/projects/doctrine-orm/en/2.11/reference/working-with-associations.html#orphan-removal
@EgorDemeshko
@EgorDemeshko 5 месяцев назад
ty for your lessons. it's pure gold. but i can't understand these onwning inverse concept)) looks like it's key topic on assositions. right now im strugling with user user_details "onotoone" relation, user.id is annotated as Autogenerared, and UserDetails.user_id have #[ORM\OneToOne(targetEntity: User::class)] #[ORM\JoinColumn(name: "user_id", referencedColumnName: "id")] private ?User $user_id = null; and on $em->flush() i got error that user_id is null, (i always annotated userDetails.user_id as not to be null). i suppose it should be autopopulated from user.id. but this didn't happen. trying to relisten your explanation several times.
@EgorDemeshko
@EgorDemeshko 5 месяцев назад
"owning side is one that holds the foreign key." invoice_id is foreign key but next your phrase tricks me. "so invoiceItem is owning side", and in animation green arrow points to Invoice.
@EgorDemeshko
@EgorDemeshko 5 месяцев назад
sorry but doctrine docs is more confusing)))
@EgorDemeshko
@EgorDemeshko 5 месяцев назад
and i have onetoone relation one user can have one user details
@EgorDemeshko
@EgorDemeshko 5 месяцев назад
should we use inversedBy and mappedBy in onetoone relation? in docs i see that it's optional.
@ProgramWithGio
@ProgramWithGio 4 месяца назад
Yes, owning side is the one holding the foreign key, arrow just points to the relation that it owns
@mdsohan6968
@mdsohan6968 Год назад
The girl in this video is very beautiful
@ProgramWithGio
@ProgramWithGio Год назад
It's a stock video 😁
@jackrourke9237
@jackrourke9237 2 года назад
Great tutorial as always to make complicated things as simple as cup of tea
@ProgramWithGio
@ProgramWithGio 2 года назад
Thank you 💙
@TomiBorchert
@TomiBorchert Год назад
so relationsships, like manytoone etc. it's same as using foreign key?
@ProgramWithGio
@ProgramWithGio Год назад
A foreign key relationship can be onetoone, onetomany, etc
@ЯоКуассиЖан-Клод
@ЯоКуассиЖан-Клод 9 месяцев назад
Thanks you very much! excellent job)
@ProgramWithGio
@ProgramWithGio 9 месяцев назад
Glad you like it, thank you 🙌
@АртурЗарипов-б2й
@АртурЗарипов-б2й 5 месяцев назад
Good job! Thank you very much!
@ProgramWithGio
@ProgramWithGio 5 месяцев назад
Thank you
@expresscoding3525
@expresscoding3525 10 месяцев назад
At 20:34, why in my invoice_items table, data for example: 'item 1' got id of 3 and item 2 got id of 2 and item 3 got id of 1, and item 3 is in first row, item 2 in second row and item 1 in third row, why is that , sir ?
@ProgramWithGio
@ProgramWithGio 10 месяцев назад
It's auto increment id so u won't get exact same ids as I got on my video. If you've deleted some previous rows the id still gets incremented next time you insert
@expresscoding3525
@expresscoding3525 10 месяцев назад
but why things got inserted in reverse order, ids ( primary key ids are ok ), but datas are not inserted in the way it's seen in the array, because in array the first item is item1 so I should see item1 inserted at top row in database, but I see it in bottom row, why ?
@ProgramWithGio
@ProgramWithGio 10 месяцев назад
@@expresscoding3525 i don't see your code so I don't know, if you share your code I can check. In the video the order looks fine
@mwaas
@mwaas Год назад
but what different between Entity and model . each of them reference to table in database;
@ProgramWithGio
@ProgramWithGio Год назад
I think this has a good summary of each: gist.github.com/marlenesco/6e31ebc12f78583a9ae417ac0f6647e3
@mwaas
@mwaas Год назад
@@ProgramWithGio super thank for you 🙏
@timfry887
@timfry887 Год назад
How does the One-to-Many work when there are many tables linking back to a single table? For instance, it is common to see a table of country codes and/or state codes to be used in an application. The country codes and state codes are used many times with different displays, emails, etc. Even in this example there might not be that many tables that link but there might be more. Also, I am curious how that would apply to when a 'plug-in' type would be used. Is it possible for the entity object representing the table of country codes to know about the plug-in without changing the core of the application?
@ProgramWithGio
@ProgramWithGio Год назад
One-to-Many is a relationship between tables or entities, its not about how many times you display it or in how many places you use it. It's about how many transaction records in database table belong to a category via category_id column which references to categories table. In your example, countries could be a table that stores country code as well as some other information, you then could have another table called states which stores state code & other state related information but it also stores country id or country code which references to the country record in the countries table. I'm not sure what you mean by "plug-in" though.
@GreyDeathVaccine
@GreyDeathVaccine 2 года назад
sztring 🙂
@ProgramWithGio
@ProgramWithGio 2 года назад
Did I have a typo somewhere? :D
@kristun216
@kristun216 Год назад
Interesting, when you did the remove Invoice entity I noticed it was already removing the related InvoiceItems already, cascade on remove is the default behaviour it seems. Neat.
@ProgramWithGio
@ProgramWithGio Год назад
We have cascade on persist & remove enabled in Invoice entity. github.com/ggelashvili/learnphptherightway-project/blob/3.16/app/Entity/Invoice.php#L38
@expresscoding3525
@expresscoding3525 11 месяцев назад
This code at the end part of this video didn't work for me sir: $invoice = $entityManager->find (Invoice::class, 4); //$invoice->setStatus(InvoiceStatus::Paid); $invoice->getItems()->get(4)->setDescription('Foo Bar'); $entityManager->flush(); Fatal error: Uncaught Error: Call to a member function setDescription() on null in ...
@ProgramWithGio
@ProgramWithGio 11 месяцев назад
That just means line item 4 doesn't exist, in video we get 0 not 4
@expresscoding3525
@expresscoding3525 11 месяцев назад
I've invoice with id 4 in invoices table, sir, that's why I did 4
@ProgramWithGio
@ProgramWithGio 11 месяцев назад
@@expresscoding3525 ->get doesn't take id, takes index
@expresscoding3525
@expresscoding3525 11 месяцев назад
Index means? I mean where to see the index ?
@ProgramWithGio
@ProgramWithGio 11 месяцев назад
@@expresscoding3525 position, like an array index/key.
@bartanakin3635
@bartanakin3635 2 года назад
18:56 Class Setup seems to be deprecated now. Instead we should use ORMSetup class.
@ProgramWithGio
@ProgramWithGio 2 года назад
I did not know that, thank you for pointing it out. Seems like it will be removed in 3.0 version.
@Zubbee
@Zubbee 2 года назад
Wow, this was a bit more complex. Would take getting used to. But like you said practice and use will really help me get familiar. Never the less it was so much fun. I don't know where I would have learnt this... Gio, thank you
@ProgramWithGio
@ProgramWithGio 2 года назад
It's totally normal, Doctrine & ORM/DBAL in general is not an easy concept so good job
@bluemodize7718
@bluemodize7718 2 года назад
I love your channel
@ProgramWithGio
@ProgramWithGio 2 года назад
Thank you 💙
@JhonathasCavalcante
@JhonathasCavalcante 2 года назад
Awesome content, simple and direct. Congrats...
@ProgramWithGio
@ProgramWithGio 2 года назад
Glad you like it, thank you 🙌
@mahmoudhazem1300
@mahmoudhazem1300 2 года назад
Great as usual thanks 🙂
@ProgramWithGio
@ProgramWithGio 2 года назад
Thank you 🙌
Далее
Doctrine ORM Query Builder - Full PHP 8 Tutorial
19:48
Doctrine ORM: Entity, Identity Map, Unit Of Work
47:29
Просмотров 3,7 тыс.
Попробовал салат! А вы? 😋
00:23
Просмотров 2,7 млн
5 Rules For DTOs
17:56
Просмотров 42 тыс.
UUID vs INT: What’s Better For Your Primary Key?
9:40
Prisma, Eloquent, Doctrine: Why Use an ORM?
3:30
Просмотров 6 тыс.