2725 search results for Doctrine

52 lines | src/Repository/GenusRepository.php
// ... lines 1 - 5
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
// ... lines 7 - 10
class GenusRepository extends ServiceEntityRepository
{
// ... lines 13 - 50
}
See Code Block in Script
28 lines | app/config/config_test.yml
// ... lines 1 - 23
doctrine:
dbal:
url: 'sqlite:///%kernel.project_dir%/var/data/test.sqlite'
// ... lines 27 - 28
See Code Block in Script
26 lines | app/config/config_prod.yml
// ... lines 1 - 3
doctrine:
orm:
metadata_cache_driver: apcu
# result_cache_driver: apc
query_cache_driver: apcu
// ... lines 9 - 26
See Code Block in Script
26 lines | app/config/config_prod.yml
// ... lines 1 - 3
#doctrine:
# orm:
# metadata_cache_driver: apc
# result_cache_driver: apc
# query_cache_driver: apc
// ... lines 9 - 26
See Code Block in Script
27 lines | app/config/services.yml
// ... lines 1 - 5
services:
// ... lines 7 - 21
app.doctrine.hash_password_listener:
class: AppBundle\Doctrine\HashPasswordListener
autowire: true
// ... lines 25 - 27
See Code Block in Script
78 lines | src/AppBundle/Entity/GenusScientist.php
// ... lines 1 - 5
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
// ... lines 7 - 8
/**
// ... lines 10 - 11
* @UniqueEntity(
// ... lines 13 - 14
* )
*/
class GenusScientist
{
// ... lines 19 - 77
}
See Code Block in Script
51 lines | src/Repository/ArticleRepository.php
// ... lines 1 - 5
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
// ... lines 7 - 14
class ArticleRepository extends ServiceEntityRepository
{
// ... lines 17 - 49
}
See Code Block in Script
15 lines | src/AppBundle/Entity/Genus.php
// ... lines 1 - 2
namespace AppBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
// ... lines 6 - 15
See Code Block in Script
... ", "doctrine/doctrine-bundle": "^2.1", "doctrine/doctrine-migrations-bundle": "^3.0", "doctrine/orm": "^2.7", "sensio/framework-extra-bundle": "^5.5", "symfony/asset": "5.1.*", "symfony/console ...
... /doctrine-extensions is just a PHP/Doctrine library that was ported to Symfony as a bundle thanks to StofDoctrineExtensionsBundle. unfortunately, it has a very slow support, so a guy decided to fork it and make Symfony 5 ...
The QueryBuilder

... It's really powerful to understand that DQL is ultimately what's being used behind the scenes in Doctrine. But most of the time, we're not going to build this DQL string by hand. Nope, we're going to use something ...

2:02
Keep Going

Keep Going!¶ You’re awesome. Seriously. This was probably the most important episode yet, and you made it. Congrats! The first big piece included the two main Doctrine associations: ManyToOne and ManyToMany. We saw ...

1:19
... */ namespace App\Doctrine; use App\Entity\User; use Doctrine\Common\EventSubscriber; use Doctrine\ORM\Event\LifecycleEventArgs; use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface; class ...
... think part of the issue would be that if you were able to put this in annotations (e.g. something attached to the Category entity), Doctrine might not be able to perform the query needed to do that count. For example ...
weaverryan
weaverryan
Read Full Comment
... ] ..... BUUM!!!! ``` ... PHP Fatal error: Uncaught ReflectionException: Class Doctrine\Common\DataFixtures\AbstractFixture not found in /Users/juanluisgarciaborrego/Sites/project/src/AppBundle/DataFixtures/ORM ...
JuanLuisGarciaBorrego
JuanLuisGarciaBorrego
Read Full Comment
Hi Nick! Wow, another great question :). Actually, what you should do there is create a Doctrine event listener (http://knpuniversity.com/screencast/symfony2-ep3/doctrine-listener). Since this listener is a service, it ...
weaverryan
weaverryan
Read Full Comment
... able to update a field (e.g. password), and as Doctrine finishes saving, it would send that update to the database. But for internal, low-level reasons, this does not happen on the preUpdate event in Doctrine. What I mean ...
weaverryan
weaverryan
Read Full Comment
Hey Vince! Hmm, a few things. First, when you query for an entity (e.g. a list of ProductCategory objects), Doctrine *only* fetches the data for the ProductCategory objects - it does not automatically go and fetch the ...
weaverryan
weaverryan
Read Full Comment
... this will be depends on how clean or messy your current database is. Here are the details: http://symfony.com/doc/current/doctrine/reverse_engineering.html 2) If your empBirthday field is a Doctrine datetime or date type ...
weaverryan
weaverryan
Read Full Comment
Hey! Hmm. If I understand it correctly, in your controller, you want to pass some information to the eventual Doctrine event listener. You're correct that you can't pass it via the constructor: you DO have control ...
weaverryan
weaverryan
Read Full Comment