2709 search results for Doctrine

Contentful Loading Data from an External CMS

... quick process and would give us a lot of power on our site. But one of the beautiful things about Layouts is that our value types can come from anywhere: a Doctrine Entity, data on an external API, data in a Sylius store ...

8:02
Upgrading to Symfony 6.0

... sure the homepage works. It... doesn't!? We get Attempted the load class QueryAdapter from namespace "Pagerfanta\Doctrine\ORM. This shouldn't be a surprise... since we did upgrade pagerfanta-bundle from 2.8 to 3.6. This is ...

7:07
Making Questions owned by Users

Our site has users and these questions are created by those users. So in the database, each Question needs to be related to the User that created it via a Doctrine relationship. Right now, if you open src/Entity ...

5:13
make:user

... HumanoidEntity. If the "thing" that logs into your site would be better called a Company or University or Machine, use that name here. Do you want to store user data in the database via Doctrine? For us: that's a ...

5:57
ManyToMany with Extra Fields on the Join Table

The ManyToMany relationship is unique in Doctrine because Doctrine actually creates & manages a table - the join table - for us. This is the only time in Doctrine where we have a table without a corresponding entity ...

6:57
Owning Vs Inverse Sides of a Relation

... There's a, kind of, complex topic in Doctrine relations that we need to talk about. It's the "owning versus inverse side" of a relationship. We already know that any relation can be seen from two different sides ...

7:11
Collection Types and readableLink

... whether it's required. And it gets that from many different sources like Doctrine metadata and our own PHPDoc. And because collecting all of this can take time, it caches it. Now, API Platform is really good in dev mode ...

7:12
Property Metadata

... knows nothing about the types of each field. Are these strings? Integers? Aliens? API Platform gets metadata about each property from many different places, like by reading Doctrine metadata, PHPDoc, looking at the return ...

6:20
Completely Custom Resource

... Doctrine entity, it's much easier to add a few custom fields than to reinvent the wheel with a custom resource. After all, with a Doctrine entity, we get things like pagination and filtering for free! But sometimes... you ...

5:25
Custom Item Data Provider

... interface because that's what the core Doctrine item data provider uses... and I want to be able to pass it the same arguments. Ok: go to the "Code"->"Generate" menu - or Command+N on a Mac - and implement the one method we ...

6:57
Handling Messages Sync while Developing

... Messenger supports several different types of transport like Doctrine, redis and AMQP. And the way you choose which one you want is the beginning of the connection string, like doctrine://. The sync transport is really neat ...

5:54
Embedded Write

... that was not configured to cascade persist operations for entity User. If you've been around Doctrine for awhile, you might recognize this strange error. Ignoring API Platform for a moment, it means that something ...

8:22
Let The Setup Function

... Copy that and put it into your Service/ directory. If you're a Doctrine user, this will look familiar. But, no, I'm not recommending that you actually create or move the EntityManagerInterface into your app like this ...

7:08
Test Fixtures Fast Databases

... composer require --dev doctrine/doctrine-fixtures-bundle:2.4.1 If you downloaded the course code, in the tutorial/ directory, you should have a DataFixtures directory. Copy that into your AppBundle ...

7:18
Joins and addSelect Reduce Queries

... where selecting all the fields from a joined table will give you more fields in your result. Here, addSelect() just tells Doctrine to fetch the FortuneCookie data, but store it internally. Later, when we access the ...

6:03
Adding Links via Annotations

... But it will in a few minutes! To create this cool system, we need to understand a bit about annotations. Every annotation - like Table or Entity from Doctrine - has a class behind it. That means we need a Link class ...

6:22
Collection Filtering The Easy Way

... speak, this says that my User correctly has a studiedGenuses property with a mappedBy option... But on GenusScientist, I forgot to add the inversedBy() that points back to this: I don't really know why Doctrine requires ...

6:05
ManyToMany with Extra Fields

... migration...it will blow up, with this rude error: Incorrect table definition; there can be only one auto column... It turns out, Doctrine has a bug! Gasp! The horror! Yep, a bug in its MySQL code generation that affects ...

8:20
Give me Clean URL Strings slugs

Yes! Collections! Ladies and gentleman, this course is going to take us somewhere special: to the center of two topics that each, single-handedly, have the power to make you hate Doctrine and hate Symfony forms ...

5:39
Blog
Now Exposed composer.json package.json for every Tutorial

... For example, our Doctrine Queries Tutorial is built on an old version of Symfony (version 2!), but the logic of making queries in Doctrine hasn't changed. In this case, we give you some extra context: This course is ...