1000 search results

I need to create some Doctrine Entities in my bundle, to be used by the external App. How can I add and configure these Entities?
Lucas Baldassari
Lucas Baldassari
Read Full Comment
Do you think we should also inject Doctrine in the controller with `RegistryInterface $doctrine` instead of $this->getDoctrine()? This is my last question hehe, great course btw
Trafficmanagertech
Trafficmanagertech
Read Full Comment
Hey Trafficmanagertech Usually you don't need Doctrine itself, what you usually need is a repository or the entity manager, but if for some reason you need it, I believe you can inject it directly to a controller's action Cheers!
MolloKhan
MolloKhan
Read Full Comment
In my app I am using Doctrine Blameable Extension, so it sets the current user when creating a post on the createdBy field. How can I handle this when running my tests?
Hi, When i attempt ./app/console doctrine:schema:create I receive this error [Doctrine\Common\Annotations\AnnotationException] [Syntax Error] Expected Doctrine\Common\Annotations\DocLexer::T_CLOSE_PARENTHESIS, got 'length' at position 26 in property AppBundle\Entity\Movie::$samsCharacterName. doctrine:schema:create [--dump-sql] [--em [EM…
As soon as I switched to Doctrine's Criteria system I started getting this error: ``` An exception has been thrown during the rendering of a template ("Notice: Undefined property: AppBundle\Entity\GenusScientist::$1") in genus/list.html.twig at line 20. ```
Giorgio Pagnoni
Giorgio Pagnoni
Read Full Comment
Hey Nina, Have you imported namespace "use Doctrine\ORM\Mapping as ORM;" before GenusScientist class declaration? If so, could you show us your GenusScientist::$genus property definition with its annotations? Cheers!
Hi,guys after load bin/console doctrine:fixtures:load unexpectedvalueexception could not determine how to assign createAt to a AppBundle\Entity\GenusNote object
While I enjoyed learning about the Doctrine listener, it seems like a lot of extra work to put in the Doctrine listener to encode the password. Why not just encode the password whenever setPassword() is called? Something like the following? User Entity: ``` public function setPassword…
Terry Caliendo
Terry Caliendo
Read Full Comment
Why don't you use doctrine:generate:entities instead of Phpstorm autocompletion?
Maksym Minenko
Maksym Minenko
Read Full Comment
I have already run bin/console doctrine:migrations:migrate and it is all ok. The problem appears when i try to load fixture to recover the fake data. Cheers!
Matias Rouaux
Matias Rouaux
Read Full Comment
Hello as I launch the ./bin/console doctrine:database:create I get this error :"[Doctrine\DBAL\Exception\ConnectionException] An exception occured in driver: SQLSTATE[HY000] [2002] Connection refused [Doctrine\DBAL\Driver\PDOException] SQLSTATE[HY000] [2002] Connection refused [PDOException] SQLSTATE[HY000] [2002] Connection refused " Can someone…
Marco La Cugurra
Marco La Cugurra
Read Full Comment
Do you need getters and setters for Doctrine/Symfony to work? Or can you just make the Entity properties public? Also... along the same lines... why even use getters and setters? I've read that its so that you can later add further functionality to…
Terry Caliendo
Terry Caliendo
Read Full Comment
…bin/console doctrine:schema:update --dump-sql without getting an error: Compile Error: Cannot use Doctrine\ORM\Mapping as ORM because the name is already in use This is because I am using the following use Doctrine\ORM\Mapping\Column as ORM; use Doctrine\ORM…
Hi everybody, I have a question about Doctrine : if, i have to connect to an existing database, with tables and foreign keys, will Doctrine still be okay to do that ? Thanks
Gremet Laurent
Gremet Laurent
Read Full Comment
Hey Juan Nicolás An entity in Doctrine represents a record in a table for your DB, so that's why you see a lot of DB metadata, such as relationships, field types, etc. Most of the time they have pure data, but you can put…
MolloKhan
MolloKhan
Read Full Comment
Fatal error: Uncaught TypeError: Return value of Doctrine\Common\Annotations\AnnotationRegistry::registerLoader() must be an instance of Doctrine\Common\Annotations\void, none returned in /home/ywoume/www/upgrade/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php on line 117 i use php7.1
Rajaona F.
Rajaona F.
Read Full Comment
I've been using Symfony and Doctrine for a few months now, but there's always been a couple of things about Doctrine that made me wonder. In this example you have added the argument EntityManagerInterface $em to the new() method. Could you tell me…
When I run "php bin/console doctrine:fixtures:load", I get: In ReferenceRepository.php line 141: Reference to: (App\DataFixtures\Article_0) does not exist However, doing some tiny debugging, I found out that if I change this line: $comment->setArticle($this->getReference(Article::class…
RoyalShape
RoyalShape
Read Full Comment
Having a small problem with "doctrine:generate:entities" when following along with my own project: http://windupbear.blogspot.com/2016/01/symfony2-and-doctrine-issues.html
Jon Chapman
Jon Chapman
Read Full Comment