1000 search results

Doctrine’s QueryBuilder

Doctrine’s QueryBuilder¶ What if we wanted to find a User by matching on the email or username columns? We would of course add a findOneByUsernameOrEmail method to UserRepository: // src/Yoda/UserBundle/Entity/UserRepository.php // ... class UserRepository extends EntityRepository { } To make queries, you can use…

2:25
Doctrine, Symfony & the Database

…or 10! This tutorial is all about Doctrine: a powerful ORM that will allow us to talk to a database from inside our Symfony app. Historically, Doctrine has sometimes had a reputation for being hard to learn. But with recent changes in the Symfony world…

23 videos
|
2:22:24
Doctrine & the Database in Symfony 4

…put our new skills to the test! It's finally time to make up app come alive by using Doctrine to connect to a database. Doctrine is an amazing ORM that works great with Symfony and is super powerful. It also has a reputation for…

18 videos
|
1:56:34
Doctrine Collections: ManyToMany, Forms & other Complex Relations

…Counting collections in the EXTRA_LAZY way Rendering relationship data from both sides Filtering collections efficiently with Criteria (mind will be blown) Dealing with complex collection forms Adding "extra" data to the "join table" Doctrine relationships take a little bit more work to get setup…

28 videos
|
2:24:59
Installing Doctrine

…added an empty migrations/ directory, an empty src/Entity/ directory, and an empty src/Repository/ directory. We'll dive into all of these one-by-one. Ok! We have Doctrine installed, so we can talk to databases... except that... we don't actually have a…

3:51
Upgrading Doctrine & Native Lazy Objects

…because we accessed its name. In the dump panel, we can see the Starship is now fully loaded with all its properties. So this CG Proxy thing is a real class Doctrine generates on the fly. It contains all the logic to fetch the data…

7:27
Course

Learn Symfony

Symfony, Doctrine Relations & Warp Drive Basics

…of a relation Filtering a collection of related objects with Criteria orphanRemoval (not as heartless as it sounds!) Querying with Joins Solving the N+1 problem ManyToMany Relations ManyToMany with extra data on the join table Your mission: tackle Doctrine relationships... without crashing the ship…

24 videos
|
1:14:57
Installing Doctrine

…username and password. What uses this environment variable? Excellent question! Check out a new file the recipe gave us: config/packages/doctrine.yaml. Most of this config you won't need to think about or change. But notice this url key: it reads that DATABASE…

6:15
Simple Doctrine Data Fixtures

…fixtures, in a sense, via this new action. But Doctrine has a system specifically designed for this. Search for "doctrinefixturesbundle" to find its GitHub repository. And you can actually read its documentation over on Symfony.com. Copy the install line and, at your terminal, run…

3:25
Installing Doctrine

…to our tutorial about learning Spanish! What? That's next week? Doctrine? Ah: welcome to our tutorial all about making Symfony talk to a database... in English. We learned a ton in the first two courses of this series, especially the last tutorial where we…

7:54
Sluggable: Doctrine Extensions

…a feature, you need to enable it in this config file. The first behavior we want is sluggable. To enable it add orm: - because we're using the Doctrine ORM: and then default:, because we want to enable this on our default entity manager. That…

5:57
Installing Doctrine

…the database the_spacebar: Of course, this sets a DATABASE_URL environment variable. And it is used in a new config/packages/doctrine.yaml file that was installed by the recipe. If you scroll down a bit... you can see the environment variable being used…

4:44
ManyToOne Doctrine Relationships

ManyToOne Doctrine Relationships¶ Right now, if I creat an Event, there’s no database link back to my user. We don’t know which user created each Event. To fix this, we need to create a OneToMany relationship from User to Event. In the database…

4:40
Mastering Doctrine Relations in Symfony 4!

In the part 1 of the Doctrine Tutorial we created a freakin' awesome setup: with Doctrine: entities, queries, migrations and fixtures. But, we're missing a big, giant, huge, important piece! Database relations! And once you've mastered these, you'll be unstoppable! But... a…

19 videos
|
2:14:20
Mastering Doctrine Relationships in Symfony 3

…of the Doctrine Tutorial we got a sweet setup with Doctrine: entities, queries, migrations and fixtures. But, we left out one big piece: database relations. Once you've mastered these, you'll be unstoppable. Unfortunately, a lot of information out there make Doctrine relations look…

10 videos
|
34:47
Track
Learn Doctrine

Working with databases doesn’t have to be painful. Doctrine lets you think in objects while it handles the messy SQL details behind the scenes. In this track, we’ll start from the basics — entities, repositories, and migrations — and work our way up to relationships…

4 Courses
|
4 videos
Routing with Doctrine Inheritance

Let's create a dedicated show page for our starships and check out how routing works with Doctrine inheritance entities. We first need a new controller, so hope over to the terminal and run: symfony console make:controller Starship No need for any tests. Alright…

5:19
Course

Learn Symfony

Go Pro with Doctrine Queries

You already know how to query with SQL, so learning how to do complex queries with Doctrine should not be a pain! In this tutorial, we'll learn about: the language Doctrine speaks (DQL) the QueryBuilder object JOINs! And using them to reduce queries SELECTing…

16 videos
|
1:26:33
Go Pro with Doctrine Queries (Legacy)

…with Doctrine should not give you a headache. In this series, we'll learn the language Doctrine speaks (DQL), as well as the query builder object, how to use complex query features and even how to run good ol' fashioned raw SQL queries with Doctrine

10 videos
|
50:57