2725 search results for Doctrine

Querying the Database

... Now that we've saved some stuff to the database, how can we read or query for it? Once again, at least for simple stuff, Doctrine doesn't want you to worry about querying. Instead, we just ask Doctrine for the objects ...

7:25
Persisting to the Database

... Doctrine will handle the insert queries for us. To help do this in the simplest way possible, let's make a fake "new Vinyl Mix" page. In the src/Controller/ directory, create a new MixController class and make this extend the ...

6:43
Relation OrderBy fetch=EXTRA_LAZY

... ... simply to count them! That's total overkill! As soon as we access this answers property, Doctrine queries for all the data so that it can return all of the Answer objects. Normally, that's great - because we do want ...

7:22
Data Persister Decoration

... save or persist that object. Usually, this means that we're saving an entity object to the database via Doctrine. But we could "save" an object anywhere, like by sending the data to another API, or putting it into Redis ...

6:48
ManyToMany Relationship

... owning versus inverse stuff is important because, when Doctrine saves an entity, it only looks at the owning side of the relationship to figure out what to save to the database. So, if we add tags to an article, Doctrine ...

6:52
Custom Queries

... the web debug toolbar. Ah, it turns out this is an EntityRepository object - something from the core of Doctrine. And this class has the helpful methods on it - like findAll() and findOneBy(). Ok, wouldn't it be sweet if ...

6:16
HI all! I'm currently facing an issue when trying to load via composer the Doctrine fixtures bundle.I've seen different topics on Github and Stackoverflow but I can't resolve my problem . All the solutions below ...
Valgritim
Valgritim
Read Full Comment
Forever Scroll with Turbo Frames

... You've made it to the final chapter of the Doctrine tutorial! This chapter is... a total bonus. Instead of talking about Doctrine, we're going to leverage some JavaScript to turn this page into a "forever scroll". But ...

7:47
The Query Builder

... execute a custom query in Doctrine. Doctrine, of course, eventually makes SQL queries. But Doctrine works with MySQL, Postgres and other database engines... and the SQL needed for each of those looks slightly different ...

10:04
The QueryBuilder

Doctrine speaks DQL, even though it converts it eventually to SQL. But actually, I don't write a lot of DQL. Instead, I use the QueryBuilder: an object that helps you build a DQL string. The QueryBuilder is one of my ...

2:02
The Mysterious User Provider

... User from the session and making sure that it's up to date. In Doctrine, we'll want our's to re-query for a fresh User object to make sure all the data is still up-to-date. The user provider is also responsible for a few ...

2:18
... /doctrine-extensions-bundle v1.4.2 - Conclusion: don't install antishov/doctrine-extensions-bundle v1.4.1 - Conclusion: remove doctrine/cache 1.10.2 - Conclusion: don't install doctrine/cache 1.10.2 ...
... Hello, I can't install stof/doctrine-extensions-bundle. I get the following error message: Using version ^1.4 for stof/doctrine-extensions-bundle ./composer.json has been updated Loading composer repositories ...
Deplaine N.
Deplaine N.
Read Full Comment
... It's a big text ` C:\symfony\tlt>php bin/console make:migration -vvv In AbstractMySQLDriver.php line 106: [Doctrine\DBAL\Exception\DriverException] An exception occurred in driver: could not find driver ...
Dennis E.
Dennis E.
Read Full Comment
... I'm getting some strange deprecation warnings from (it appears: ) foundry: 09:55:55 INFO [deprecation] User Deprecated: Method Doctrine\ORM\Event\LifecycleEventArgs::getEntityManager() is deprecated and will be ...
... Hi! I'm running this code on Ubuntu and on the point of composer require migrations I get the following error: ` Using version ^3.0 for doctrine/doctrine-migrations-bundle ./composer.json has been updated Loading ...
Michel K.
Michel K.
Read Full Comment
105 lines | composer.json
{
// ... lines 2 - 3
"require": {
// ... lines 5 - 8
"doctrine/doctrine-bundle": "^1.6.10|^2.0",
"doctrine/doctrine-migrations-bundle": "^1.3|^2.0",
"doctrine/orm": "^2.5.11",
// ... lines 12 - 44
},
// ... lines 46 - 103
}
See Code Block in Script
I am getting following depreciation message. How can we get rid of it? Because it is a little bit annoying shown in all pages (authenticcated ones) :) ``` User Deprecated: Doctrine\Common\ClassLoader is deprecated ...
84 lines | composer.json
{
// ... lines 2 - 3
"require": {
// ... lines 5 - 7
"composer/package-versions-deprecated": "^1.8",
"doctrine/doctrine-bundle": "^2.1",
"doctrine/doctrine-migrations-bundle": "^3.0",
"doctrine/orm": "^2.7",
// ... lines 12 - 26
},
// ... lines 28 - 82
}
See Code Block in Script
Raw SQL Queries

... To start, comment out the ->createQueryBuilder() query. Then, we need to fetch the low-level Doctrine Connection object. We can get that with $conn = $this->getEntityManager()->getConnection(). Toss dd($conn) onto the ...

6:52