2725 search results for Doctrine

Doctrine Behaviors 2 is out! https://www.tomasvotruba.cz/blog/2019/12/30/doctrine-behaviors-2-0-reloaded/ ...
Tomáš Votruba
Tomáš Votruba
Read Full Comment
79 lines | app/config/config.yml
// ... lines 1 - 42
# Doctrine Configuration
doctrine:
dbal:
// ... line 46
host: "%database_host%"
port: "%database_port%"
dbname: "%database_name%"
user: "%database_user%"
password: "%database_password%"
// ... lines 52 - 79
See Code Block in Script
13 lines | src/AppBundle/Entity/Movie.php
// ... lines 1 - 4
/**
* @Doctrine\ORM\Mapping\Entity
* @Doctrine\ORM\Mapping\Table(name="movie")
*/
class Movie
{
}
See Code Block in Script
51 lines | config/packages/doctrine.yaml
doctrine:
// ... lines 2 - 7
orm:
// ... lines 9 - 18
filters:
fortuneCookie_discontinued:
class: App\Doctrine\DiscontinuedFilter
enabled: true
parameters:
discontinued: false
// ... lines 25 - 51
See Code Block in Script
17 lines | config/bundles.php
// ... lines 1 - 2
return [
// ... lines 4 - 13
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
];
See Code Block in Script
... `- Removing doctrine/doctrine-cache-bundle (1.3.5) - Removing fzaninotto/faker (v1.8.0) - Removing jdorn/sql-formatter (v1.2.17) - Removing symfony/contracts (v1.1.5) - Removing symfony/test-pack (v1.0.6) - Removing ...
Migrations

... Doctrine compared the current state of our entities to the database and generated the SQL needed to make them match. Wow! There's also a down() method... because migrations can be reversed, but I've never done that, so I ...

2:33
Doctrine’s QueryBuilder

... /UserRepository.php // ... class UserRepository extends EntityRepository { } To make queries, you can use an SQL-like syntax called DQL, for Doctrine query language. You can even use native SQL queries if you’re doing ...

2:25
You mention in the video to not bother with the version info on the composer command for the doctrine-migration-bundle, but the installation failed for me without it. When I used the entire command given at on the ...
Andy @ melt
Andy @ melt
Read Full Comment
Hi Guys: Is it possible to roll back you doctrine schema. I know you are going to introduce Doctrine Migrations bundle for the following lesson. But my old project doesn't have Doctrine Migrations bundle, and I want ...
... That's probably not a bad idea - I try to avoid Doctrine listeners if I can, and instead do work in services, and call those services when needed. Doctrine is great, but Doctrine listeners are a weird place, where you're already right in the middle of saving something. Not a bad policy to avoid :). Cheers!
weaverryan
weaverryan
Read Full Comment
... //symfony.com/doc/current/doctrine/custom_dql_functions.html Doctrine docs: https://www.doctrine-project.org/projects/doctrine-orm/en/current/cookbook/dql-user-defined-functions.html Cheers!
MolloKhan
MolloKhan
Read Full Comment
Hey 3amprogrammer , You're right, Doctrine relates to the database, but also it relates to the data in common. Doctrine has a nice doctrine/cache library which helps to cache data, i.e. you could easily cache data which you fetch from a database, which in turn reduce a database server loading. Cheers! ...
Hey |mention:76041| That's a good question. I believe Doctrine does not support setter methods. They are not explicit about it in the docs though https://www.doctrine-project.org/projects/doctrine-orm/en/latest/reference/dql-doctrine-query-language.html#new-operator-syntax I'd just give it a try to confirm it Cheers! ...
MolloKhan
MolloKhan
Read Full Comment
... "Doctrine itself doesn't come with any pagination features." "Doctrine\ORM\Tools\Pagination\Paginator" is there at least from 2013 (version 2.4). It is very simple to compare with KnpPagination Bundle, but it is there. This pure doctrine paginator is also used in the Symfony FastTrack book.
Hey davidmintz The `doctrine/cache` library was deprecated some time ago. I'm not sure how you ran into this problem but I'm guessing you upgraded the DoctrineBundle library. Try upgrading all doctrine libraries by running ``` composer upgrade "doctrine/*" ``` and clear the cache manually just in case `rm -rf var/cache` ...
MolloKhan
MolloKhan
Read Full Comment
Cheers! And yea, I think Doctrine is much harder than Symfony :). Doctrine gets tricky with relationships, and it really just comes down to getting the configuration correct, then everything works nicely. Doctrine is ...
weaverryan
weaverryan
Read Full Comment
... FYI it's not compatible with Symfony 4.4 and you will need to change some files `src/Repository/ImagePostRepository.php ` replace `Symfony\Bridge\Doctrine\RegistryInterface` with `Doctrine\Persistence\ManagerRegistry ...
Hey Nizar To remove the generate images by the bundle you can use its Cache service and call `remove()` on it passing the path to the file. And, you can make it automatic if you create a Doctrine listener for hooking ...
MolloKhan
MolloKhan
Read Full Comment
Unbelievable that a mature orm framerowk like Doctrine doesn't support having attributes on a many-to-many relationship. To me that's enough to dismiss Doctrine as garbage and start looking for alternatives. What is disturbing is that Symfony seems to "promote" Doctrine as the go-to choice for orm. ...
Matteo S.
Matteo S.
Read Full Comment