2726 search results for Doctrine

Last example in [Doctrine documentation about fetching entities automatically](https://symfony.com/doc/current/doctrine.html#fetch-automatically) is missing essential parameter to the MapEntity: FQCN of the Entity, it ...
Hey Domin, Thank you for this tip! Yeah, we definitely want the filter for ORM not ODM as we use Doctrine ORM in this project :) But yeah, easy to miss this tiny difference in the long namespace, so it might be helpful for others. Cheers! ...
Hey @websafe, Connecting to a database is pretty simple with Symfony. You only need to install Doctrine `composer require symfony/orm-pack` then, override the connection environment variable like this: `DATABASE_URL ...
MolloKhan
MolloKhan
Read Full Comment
Hey |mention:76041| That's a good question. IIRC, the cache won't be invalidated automatically. You can implement a Doctrine listener for detecting when the related entity is deleted, or you can just invalidate it upon deleting the image (if you have a CRUD controller, you could hook into the DELETE action) Cheers! ...
MolloKhan
MolloKhan
Read Full Comment
Hey SymfonyCast! I had a question about querying images from the database. Would it be better to make URL requests for images statically from api's or is it better to query images from the database? And yes, I've learned that Doctrine queries the database in the background; with the focus on instantiating objects not tables. ...
... applying inheritance to Doctrine is not always easy. So, unless you got a strong reason to use inheritance I suggest avoiding it Cheers!
MolloKhan
MolloKhan
Read Full Comment
Hey |mention:75363| , IMO the Doctrine DB prefixes feature is a completely standalone feature that is implemented via an event listener, so in theory yes, you can use that in this case if you need it. Unfortunately ...
Hey @Frederic_H-F, Thanks for kind words! And sorry, but that course is not out yet, so keep an eye on new courses. PS while waiting, you can check "ManyToMany" chapters here: https://symfonycasts.com/screencast/doctrine-relations it is a bit older (Symfony5), but the main idea is pretty same =) Cheers! ...
Hey, At the time of the comment I didn't spend much time looking for tutorials which was the reason I just agreed. I'm currently not in the financial position to buy courses but I found the documentation for doctrine which is also very helpful and enough for my purpose :) ...
Brentspine
Brentspine
Read Full Comment
Hey |mention:7778| We are sorry for the inconvenience. Yeah, we are using MySQL server for this course, and this `docker-compose.yaml` is the default part of the Doctrine recipe which was installed. I registered ...
... I'm gettting this error: - doctrine/migrations[3.2.0, ..., 3.3.0] require symfony/console ^3.4 || ^4.4.16 || ^5.0 -> found symfony/console[v3.4.0-BETA1, ..., 3.4.x-dev, v4.4.16, ..., 4.4.x-dev, v5.0.0-BETA1, ..., 5.4.x-dev] but it conflicts with your root composer.json require (6.0.*). I can't seem to solve it
Yes, It was I meant, I have read this tutorial and the doctrine documentation about it, there was some differences and I was unable to understand what the *rector.php* file is and where to put it. So I mixed your documentation and try something and it worked, so I though a comment was useful for futur readers. ...
... @josefo-d: /var/www/vhosts/project-s3 on master [!?] $ console doctrine:migrations:diff [Doctrine\DBAL\Schema\SchemaException] There is no column with name 'isRead' on table 'contact'. ``` what could be the issue here?
jlchafardet
jlchafardet
Read Full Comment
Thank you |mention:9979| You're right, if your migration will change data or will add a non-nullable field, you have to be careful and create a "safe" migration. Ryan talks just a bit about it here https://symfonycasts.com/screencast/symfony5-doctrine/bad-migrations ...
MolloKhan
MolloKhan
Read Full Comment
Hi team, I know this is an old lecture, but I'm wondering if the technique to use Doctrine filters in this way can still be used in Symfony 6.2? (do you have a recent tutorial using them?) If not, is there a new/recommended approach? Thank you! ...
Markchicobaby
Markchicobaby
Read Full Comment
Hello I need help, when i try to delete a user i get this error: You cannot refresh a user from the EntityUserProvider that does not contain an identifier. The user object has to be serialized with its own identifier mapped by Doctrine. the strange thing is that sometimes works and on other occasions delete more than one user ...
Luis-MCM-925
Luis-MCM-925
Read Full Comment
... believe you don't have Doctrine installed, or for some reason the problem it's in your vendors, you could try reinstalling them Cheers!
MolloKhan
MolloKhan
Read Full Comment
Hey Jade! Could you dump the `$variable` that you passing to the `persist()` method before the `$em->persist($variable);` line? It should be a valid Doctrine entity, but maybe you have some different object or even different type of this var here. Cheers! ...
... `Unable to guess how to get a Doctrine instance from the request information for parameter "user".` Please give me hint to solve that. Thank you!
Sahetmyrat
Sahetmyrat
Read Full Comment
... In the "Script" version of this tutorial, you forgot the call to ApiFilter class here: ``` use use ApiPlatform\Metadata\ApiFilter; // the line you forgot in the text version of the tutorial use ApiPlatform\Doctrine ...