2708 search results for Doctrine

Data Fixtures

... fixtures --dev This is another flex alias: orm-fixtures installs doctrine/doctrine-fixtures-bundle When this finishes... it installed a recipe! I committed all of my changes before recording, so I'll run ...

5:18
Profiling Command Line scripts

... deep Doctrine stuff. Let's check out the command and look for the EntityManager::flush() call: Yep! I flush once each time at the end of the loop, which updates that database row. If you're familiar with Doctrine, you ...

6:33
Creating Embedded Objects

... and it is setting it onto the cheeseListings property of the new User. But nothing ever calls $entityManager->persist() on that new CheeseListing, which is why Doctrine isn't sure what to do when trying to save the User ...

7:06
Owning Vs Inverse Relations

We need to talk about a very, very important and, honestly, super-confusing part of Doctrine relations! Listen closely: this is the ugliest thing we need to talk about. So, let's get through it, put a big beautiful ...

7:26
Fetching Relations

... article_id, and only think about the properties on your entity classes. That's why we use 'article' => $article. Of course, behind the scenes, Doctrine will make a query where article_id = the id from this Article. But, in ...

6:02
Clearing the Database

... that, go back to config_test.yml. In a Symfony 4 Flex application, you should create a config/packages/test/doctrine.yaml file since this will contain Doctrine configuration that you only want to use in the test ...

6:19
Yep, Victor is right! In fact, this API endpoint will be updated to handle *real* data in chapter 13 of the Doctrine tutorial :) https://knpuniversity.com/screencast/symfony-doctrine Cheers! ...
weaverryan
weaverryan
Read Full Comment
In my company we work with Symfony but for Doctrine they says: "we will not use Doctrine because of performance issue with tons of data". Are they right? If not give me arguments to convince them they are wrong. ...
Paweł C.
Paweł C.
Read Full Comment
Hello, What is the best practice to add an one to one cross database relationship with Doctrine? Seems by default doctrine doesn't support this and wonder if we can achieve this somehow. Thanks a lot. ...
Hey Lily Look's like your composer didn't install the bundle, can you double check by looking at "/your/project/vendor/doctrine/doctrine-fixtures-bundle/" that directory should exists Cheers! ...
MolloKhan
MolloKhan
Read Full Comment
Hi everybody, I have a question about Doctrine : if, i have to connect to an existing database, with tables and foreign keys, will Doctrine still be okay to do that ? Thanks ...
Gremet Laurent
Gremet Laurent
Read Full Comment
One Q : why is Doctrine so "obvious" at the newAction level ($this->getDoctrin()->...) ? Do we discover later how to abstract it yet further where our entire controller could just change from Doctrine to something different? ...
Richie Hamburg
Richie Hamburg
Read Full Comment
I got this error after adding the hash_password_listener to services.yml: Doctrine event listener "app.doctrine.hash_password_listener" must specify the "event" attribute. Adding ', event: prePersist' to the tag fixes this, but perhaps I missed something when creating the Doctrine event listener? ...
... Thanks. I'm posting here the final code: $em = $this->getContainer()->get('doctrine')->getManager(); $em->getConnection()->exec('SET foreign_key_checks=0'); $purger = new ORMPurger($this->getContainer()->get('doctrine')->getManager()); $purger->purge(); $em->getConnection()->exec('SET foreign_key_checks=1'); ...
... Nope, I'm running symfony 2.8 and sadly there is no var/cache directory... $em=$this->getDoctrine()->getManager(); works fine and I get autocompletion for every step. $em2=$this->container->get('doctrine')->getManager(); stops the autocompletion after get('doctrine'). ...
Yes, it has something to do with symfony cli because both serve and doctrine commands use root database. If I use `php81 bin/console doctrine...` and laragon it uses the symfony6_upgrade. ...
Slawomir-B
Slawomir-B
Read Full Comment
... If you're on the Symfony 6 track and feel like you're missing a course between "Doctrine, Symfony 6 & the Database" and this one, you are. It's this one: https://symfonycasts.com/screencast/doctrine-relations
Hey Yard, Perhaps you're on a newer Doctrine version? That's happening because Doctrine uses proxies under the hood for performance reasons. Try calling any method on the repository before the dump call Cheers! ...
MolloKhan
MolloKhan
Read Full Comment
If you have this error => Attempted to call an undefined method named "getCacheDriver" of class "Doctrine\Bundle\DoctrineBundle\Mapping\ClassMetadataFactory" and you version of SF is 5.4.8. Do composer req doctrine/persistence ^2.4 and the problem is solve ...
Hey Gustavo D. There is not an oficial release date yet but this course should happen after "Doctrine Relations" (https://symfonycasts.com/screencast/doctrine-relations) so, it should not take too long :) Cheers! ...
MolloKhan
MolloKhan
Read Full Comment