2709 search results for Doctrine

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
Custom Filter getDescription properties

... Doctrine ORM... it's actually impossible to see which one we have here... so I'll randomly guess: Hey! I got it! If you chose the wrong one, you'll have to delete your project and start over. Or... just delete this one ...

7:09
Setting a Custom Field Via a Listener

... null if the user isn't logged in: If there is no user, just return. But if there is a user, call $user->setIsMe(true): Cool! We just set the $isMe field on the authenticated User object. One cool thing about Doctrine is ...

5:32
Foundry Tricks

... fixtures: Then... refresh the homepage. All good! If we dug into the database, we'd find 20 published questions and five unpublished. Foundry can do more - especially with Doctrine relations and testing - and we'll talk ...

7:28
Fetching Data The Repository

... findOneBy(). Pass this an array of the WHERE statements we need: 'slug' => $slug. After, dd($question). Ok, let's see what this returns! Refresh and... woohoo! This gives us a Question object. Doctrine finds the matching row ...

5:28
Migrations

We have a beautiful new Question entity class that is supposed to map to a question table in the database. But... that table does not exist yet. How can we create it? Well, because Doctrine has all of this configuration ...

5:34
Fixing our Deprecations Form Controller Mailer

... all the ones from doctrine/persistence because they're not related to Symfony. With that in mind... if you look closely, there are really only two real deprecations left... and they look like the same thing: something ...

7:34
AMQP Priority Exchange

... bound to. This did work before with Doctrine, thanks to this queue_name: high option. The default value for this option is... default. As a reminder, I'll quickly log into my database ...

7:15
Adding the plainPassword Field

... do this is via a Doctrine event listener or entity listener, which are more or less the same thing. That's a fine option... though things can get tricky when a user is updating their password. We talk about that on an ...

7:31
High Priority Transports

... Let's use the same DSN as before, which in our case is using doctrine. Below, add options, then queue_name set to high. The name high isn't important - we could use anything. The queue_name option is specific to the ...

5:40
Worker Command

Even if I refresh the page, now that our messages aren't being handled immediately... the four most recent photos don't have Ponka in them. That's tragic! Instead, those messages were sent to the doctrine transport and ...

5:34
Validation

... a database error because of a new feature where validation rules are automatically added by reading the Doctrine database rules. But, whether you're seeing a 500 error, or Symfony is at least adding some basic ...

6:29
Filtering Searching

... support Doctrine ORM and Doctrine with MongoDB. Make sure to choose the class for the ORM. Ok, now move over and refresh again. We're back to life! Click "Try it out". Hey! We have a little isPublished filter input box! If ...

6:02