2725 search results for Doctrine

... I succeed in doing so with a class that implements a Doctrine eventListener but the controller remains isolated, i.e. I can't pass any further variables from the controller to the event, I can only handle the entity. I ...
pasquale_pellicani
pasquale_pellicani
Read Full Comment
... /doctrine_cache. You said you followed word-for-word - but this was the most obvious thing to check, so let's start there! 2) If you delete the var/cache/dev/doctrine... directory and then refresh, is it re-created? Or does this ...
weaverryan
weaverryan
Read Full Comment
Hello, Ryan! [1] Really handy optimization for reducing query count with addSelect(). [2] Is there an equivalent method of reducing query count for a Tree? (Tree - Nestedset behavior extension for Doctrine ...
... "registerLoader" of class "Doctrine\Common\Annotations\AnnotationRegistry". To continue coding while I get answer to this question, i did the following: 1. I run the command: "composer remove sensio/framework-extra-bundle" 2. revert the function show as it was. Any advice how to proceed? Thanks!
... configure an association here (just click on the YAML option) https://symfony.com/doc/current/doctrine/associations.html#mapping-the-manytoone-relationship And you may want to read how to configure your entities when ...
MolloKhan
MolloKhan
Read Full Comment
Hey Szymon, In this tutorial, the only difference you'll find if you use MySQL instead of PostgreSQL is the migration files. The queries generated by Doctrine will be specific to MySQL, but besides that, nothing else ...
MolloKhan
MolloKhan
Read Full Comment
Hey Dmitriy, But Doctrine already does this for you. You just need to generate an entity via MakerBundle, or make sure your User entity has this mapping config: ```php User { #[ORM\Id, ORM\Column, ORM ...
... = $this->container->get('doctrine')->getManager(); /** @var \App\Bundle\CoreBundle\Entity\Repository\AccountRepository $account */ $account = $em->getRepository('CoreBundle:Account')->find(1); return ...
Sergio Medina
Sergio Medina
Read Full Comment
Hi, Do you have a `NotNull` constraint on `User` field? I think it's a little complex problem because Validation is called before any Doctrine Listener that changes data before persisting, so the easiest way to get ...
Hi Ryan, This can also be accomplished with two entity managers and having the corresponding entities in different subdirectories. This post talks about it: http://stackoverflow.com/questions/12220198/using-doctrine-2 ...
Vladimir Z.
Vladimir Z.
Read Full Comment
... finish out the Symfony 6 course (Doctrine relations, forms and security) as early as we can this year. It's hard to look at annotations once you get used to attributes! Cheers!
weaverryan
weaverryan
Read Full Comment
Hi Mihail! Hmm, this is interesting. I can see what's happening: I think when you upgraded Doctrine, you also upgraded Symfony - it appears that it's in some weird state where part of your code is on Symfony 3, and ...
weaverryan
weaverryan
Read Full Comment
... cache:clear [KO] [KO] Script cache:clear returned with error code 255 !! !! In ContainerBuilder.php line 1089: !! !! Class Doctrine\Common\Cache ...
... can be a manual step before running your tests but you could create a shell script if you want to automate that process (it would just run a few doctrine commands) Cheers!
MolloKhan
MolloKhan
Read Full Comment
... same time to be sure the object is updated for doctrine point of view. No way, the plain password of my entity is always empty !
... be of type array|string, null given". This error is related to "./vendor/api-platform/core/src/Bridge/Doctrine/Orm/Extension/FilterEagerLoadingExtension.php" file and line 155. I don't know why this function is given ...
Hi there!, what would be a nice backend mechanism to load in a twig template header.html.twig a doctrine result based on a user id ??, for example a counter of "notices" for that user, taking in account that the ...
... in C:\xampp\htdocs\symfonycast\cauldron_overflow\vendor\doctrine\dbal\src\Driver\API\PostgreSQL\ExceptionConverter.php (line 87) // We have to match against the SQLSTATE in the error message in these cases ...
... Gedmo\Mapping\Annotation\Slug;` line in the use statements. Also, make sure you enabled the sluggable extension, see this code block: https://symfonycasts.com/screencast/symfony-doctrine/sluggable#codeblock-35894f3389 . And finally, make sure you clear the cache just in case, it might be a simple cache issue :) Cheers!
Hey guys! No error? That's even better ;) Well, most probably you have a fresher Doctrine migrations package installed, or you have a fresher MariaDB server version, or even both :) I see your app was able to ...