2709 search results for Doctrine

A bit of Security Cleanup

... tell isEmpty() to do that! Open User and look for that articles property. At the end of the @OneToMany annotation, add fetch="EXTRA_LAZY". We talked about this option in our Doctrine relations tutorial. With this set ...

7:02
The Edit Form

... "edit" form. Even Doctrine is smart enough to know that it needs to update this Article in the database instead of creating a new one. Booya! The real differences between the two forms are all the small details. Update ...

7:18
HTML5 Sanity Validation

... to true for every field... no matter what... which can be kind of annoying & surprising. However, when you bind your form to an entity class, the form field guessing system uses the nullable Doctrine option to choose the ...

6:19
Article Admin Low-Level Access Controls

... "Proxies" thing, ignore it. This is an internal object that Doctrine sometimes wraps around your entity in order to enable some of its lazy-loading relation awesomeness. The object looks and works exactly like User. Second ...

7:14
Pagination

... it stops working. If you ever need to query and render more than 100 Doctrine entities, you're going to have slow loading times. If you try to print 1000, your page probably just won't load. But no problem! Printing that ...

9:19
Updating an Entity

... after updating the object, just call $em->flush(): But wait! I did not call $em->persist($article). We could call this... it's just not needed for updates! When you query Doctrine for an object, it already knows that you ...

7:37
Flex Extras

... run: composer update doctrine/doctrine-fixtures-bundle Version 3 of this bundle is all new... but not in a "broke everything" kind of way. Before, fixture classes were loaded because ...

6:31
Migrating Services Security

Ok, remember our goal: to move our code - which mostly lives in config/ - into the new directory structure. The next section is doctrine... and there's nothing special here: this is the default config from Symfony 3 ...

8:03
Autowiring Service Deprecations

... a type-hint - like EntityManager - it would first look to see if there was a service or alias in the container with that exact id: so Doctrine\ORM\EntityManager. If there was not, it would then scan every service ...

9:17
Handling Object Dependencies

... >getDinosaurs(). Ok, good start! Next, inside Entity, create Enclosure. This will eventually be a Doctrine entity, but don't worry about the annotations yet. Add a private $dinosaurs property. And, like normal, add public ...

6:46
Override Controllers

... entity. It has an updatedAt field: To set this, we could use Doctrine lifecycle callbacks or a Doctrine event subscriber. But, I want to see if we can set this instead, by hooking into EasyAdminBundle. In other words ...

7:11
The SymfonyExtension Clearing Data Between Scenarios

... easy, since we have access to the entity manager via self::container->get('doctrine')->getManager();: Now we can issue DELETE queries on the two entities that we care about so far: product and user. I'll use $em ...

5:13
Your Very First Service

... access to this Doctrine object. The code inside EventReportManager is dependent on this “doctrine” object. Well, more specifically, it’s dependent on Doctrine’s entity manager. The fix for our puzzle is to “inject the ...

4:42
Building really fast applications Tobias Nyholm

... it's a great way to read from queues and write to queues, but do really need it. Do you need that fancy code that abstraction, maybe they AMQP extension is good enough. In writing the database. Do you need doctrine? Do you ...

38:11
... of a bundle is to allow for an automatic way for those PHP classes to be registered as services into the container. 3) About Doctrine and switching from MySQL to something else. Really, only switching from MySQL to ...
weaverryan
weaverryan
Read Full Comment
... don't need to try to make your var/cache directory writable by your web server user. > 3- In the QueryBuilder from Doctrine I see that we have the options of being able to use Cache with the methods: The `->useQueryCache ...
weaverryan
weaverryan
Read Full Comment
Hey Geoff Maddock! Cool question :) ​And actually, this has been done to join tables between MySQL and MongoDB before: https://www.doctrine-project.org/projects/doctrine-mongodb-odm/en/1.2/cookbook/blending-orm-and ...
weaverryan
weaverryan
Read Full Comment
... $ composer require doctrine maker And next I had no see the file called: config/parametre.yaml ( which I belived this is the file to config the database varaibles) or it should be add and configer in doctrine.yaml ...
... has been provided or because there is a non optional argument after this one. I know I could fix this by getting the entity manager from Doctrine with $em = $this->getDoctrine()->getManager(), but I don't really understand why it's a problem in the first place. Can you explain what's going on? ...
... service "App\BaseRepository": argument "$entityClass" of method "__construct()" references class "Doctrine\ORM\Mapping\ClassMetadata" but no such service exists. It cannot be auto-registered because it is from a different root namespace. Is there a better way to do this?
notronwest
notronwest
Read Full Comment