2725 search results for Doctrine

... UnitOfWork. Unless you have some customization, the class that should be handling that is this one: https://github.com/api-platform/core/blob/master/src/Bridge/Doctrine/Orm/ItemDataProvider.php#L68 - I would put some dump ...
weaverryan
weaverryan
Read Full Comment
... you have a situation where an entity HAS an id, but Doctrine tries to INSERT it instead of updating, the reason is that this User object has (somehow) become "detached" from Doctrine's EntityManager. *Why* that his ...
weaverryan
weaverryan
Read Full Comment
Hey Mike, Ah, I see! Yeah, it might be tricky, we do cover some simple things with LIKE query in a few tutorials like: https://symfonycasts.com/screencast/doctrine ...
... the "criteria") article. The problem is, Doctrine doesn't have the Cast() function. After hours of trying and googling, I found out, I have to register my custom DQL Function. And thanks god, there is already one, which ...
... per the docs/this video: ` $pagination = $paginator->paginate( $qb, /* query NOT result */ $request->query->getInt('page', 1)/*page number*/, 24/*limit per page*/ ); ` When I try to visit the page, Doctrine ...
... /doctrine/doctrine2/blob/6dc46e78ccf4fe75c80884e7abe41b811f2204b6/lib/Doctrine/ORM/QueryBuilder.php#L942-L945 Second, in general, the difference between an innerJoin and a leftJoin deals with whether you are joining over to ...
weaverryan
weaverryan
Read Full Comment
Sorry, I should have been more clear. I had this problem with security.request_matcher.***** in my business project, not in this tutorial. However, I was curious and I've just executed bin/console debug:config doctrine ...
... configuration contains this: ``` doctrine: dbal: url: '%env(resolve:DATABASE_URL)%' ``` When you use this config, it means that, at runtime, Symfony actually reads the DATABASE_URL environment variable ...
weaverryan
weaverryan
Read Full Comment
... point 3) I should see the details of the comercial entity by that time, and if I check the month in step 4) I should see the details by that time. The idea is like taking "snapshots" of the doctrine by months and be ...
Hotspot 3
Hotspot 3
Read Full Comment
Finding Eliminating Deprecations

... and the version it was deprecated in. But we don't see that down here. And, at the end, it references an issue from the doctrine/orm repository. Ah! This deprecation isn't coming from Symfony: it's coming from doctrine ...

6:16
Writable Collection via the PropertyAccessor

... (). I won't dive too deeply into why we can't have a setter, but it relates to the fact that we need to set the owning side of the Doctrine relationship. We talk about this in our Doctrine relations tutorial. The point is ...

6:29
Resetting the Database

... Foundry. Run: If you watched our Doctrine tutorial, you'll remember Foundry! But you may not know about its testing superpowers... which is where it really shines. The main point of this library is to help create dummy data ...

4:47
Leveraging the Core Processor

... going on? We map the UserApi to a new User object and save the new User... which causes Doctrine to assign the new id to that entity object. But we never take that new id and put it back onto our UserApi. To fix this ...

7:11
Filtering Relation Collection

... the published ones. Side note: one downside to this approach is that if a user has 100 treasures... but only 10 of them are published, internally, Doctrine will first query for all 100... even though we'll only return 10 ...

5:39
Clean URLs with Sluggable

... behavior from Doctrine Extensions. Head back to config/packages/stof_doctrine_extensions.yaml and add sluggable: true. Once again, this enables a listener that will be looking at each entity, whenever one is saved, to see if ...

6:48
Auto-complete Association Field Controlling the Query

... now looking at the profiler for the autocomplete AJAX call. Head over to Doctrine section so we can see what that query looks like. Here it is. Click "View formatted query". Cool! It looks on every field to see if it ...

5:36
AssociationField for a Many Collection

... of this relationship... for you Doctrine geeks out there. Ok, try removing "95" again and saving. Hey! We upgraded to an error! An exception occurred ... Not null violation: ... null value in column question_id of ...

6:28
Themed Pagination Links

... .. then /3! So cool! Ok team! Congratulations on finishing both Doctrine courses! Big team high five! Doctrine is one of the most important parts of Symfony and it will unlock you for almost anything else you do. So let us ...

7:07
Saving Items in a ManyToMany Relation

... the second tag to that same question. How cool is that? We simply relate the objects in PHP and Doctrine handles inserting the rows into the join table. If we saved all of this stuff and then, down here, said $question ...

6:36
The Answer Entity

Oh hey there friends! Welcome back to part 2 of our Doctrine in Symfony series... you wonderful database nerds you. Last time we mastered the basics, but good stuff! Creating an entity, migrations, fixtures, saving ...

5:32