2725 search results for Doctrine

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 ...
Marco La Cugurra
Marco La Cugurra
Read Full Comment
... autowire service "App\Repository\CheeseListingRepository": argument !! "$registry" of method "__construct()" references interface "Doctrine\Persis !! tence\ManagerRegistry" but no such service exists. You should maybe ...
julien_bonnier
julien_bonnier
Read Full Comment
... DataFixtures/ORM. But also, this tutorial covers an older version of the bundle - so this could be from a difference with the new version! In the next few days, we'll have an updated section about using Alice for fixtures in our Doctrine tutorial: http://knpuniversity.com/screencast/symfony-doctrine. Cheers!
weaverryan
weaverryan
Read Full Comment
Ohh I thought the same as you but I think I know what it doesn't work. At that point, ApiPlatform has already fetched for such object and modified it, so, when you try to fetch it again, Doctrine will detect that it's ...
MolloKhan
MolloKhan
Read Full Comment
... entity with doctrine events, for example App\Entity\Image. Today, i always follow this paradigm for my apps and manage all the files as mapped relations with Doctrine, so the approach of this tutorial perturbs me. Do you consider is not a good practise ? if yes, why ? Source (fifth item)
Hello, When i learned for the first time how to uploading file, it was recommended by Fabien Potencier to create an entity for the file and manage the UploadeFile class in the entity with doctrine events, for example ...
... ( https://github.com/symfony/symfony/issues/11056 ), and some guy ( anteriovieira ) says I should modify the doctrine version for my project. I use Symfony 2.7.5, and in my composer.json I have: "doctrine/orm": "^2.4.8". What should I do to get rid of the error? Thanks, Dan.
Dan Costinel
Dan Costinel
Read Full Comment
... : Cannot autowire service "App\Repository\CheeseListingRepository": argument "$registry" of method "__construct()" references interface "Symfony\ Bridge\Doctrine\RegistryInterface" but no such service exists. Try ...
... ="text", length=65535, nullable=true) Before the change, Doctrine sets the field inside the DB to "longtext", which accepts string up to 4GB of space, which is in my case unwanted because everyone can set this field. After the change Doctrine sets the type="text" correctly (Which means max. 65535 Chars)
... i'm using php 7.4, composer 1.9.1 and symfony cli 4.10.2 on microsofts linux sub system at the moment. and i have to update the doctrine/annotations package and the framework-extra-bundle perhaps you can add "version ...
Ok so, a stupid question. I can't understand how to use roles with database: i've read the guide and view tutorials, but my simple question is: when I create an entity with doctrine, do I need roles column? If yes (I ...
Thanks Diego Aguiar ! yet I did added annotation to Entity class namespace Bla\Entity; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Table(name="products") * ORM\Entity(repositoryClass="Bla\Repository ...
Avraham M.
Avraham M.
Read Full Comment
Yes, I managed to do it with Doctrine by following this: https://www.doctrine-project.org/projects/doctrine-orm/en/2.6/tutorials/composite-primary-keys.html Down below are the annotations I used for the GenusScientist ...
Totally! ``` use App\Kernel; use Behat\Behat\Context\Context; use Doctrine\Common\DataFixtures\Executor\ORMExecutor; use Doctrine\Common\DataFixtures\Purger\ORMPurger; class FeatureContext implements Context ...
Oh, and to add one more thing! It's not important (for Doctrine) to set the "inverse" side... but we *could* still do this technically, just to keep all our code "in sync". The reason we don't do this (well, technically ...
weaverryan
weaverryan
Read Full Comment
Hey Kristof, This is our custom exception, you can see it here: https://symfonycasts.com/screencast/doctrine-relations/awesome-random-fixtures#codeblock-4640554e87 . So, if you get this - it means you call ...
... that can't be serialized, etc etc etc). It's a big unfortunate side effect of the Doctrine magic. But I don't think that Doctrine can fix it. For them - it's a feature (and they're right). I would love a "smoother" path around this problem, but I can't think of anything... Cheers!
weaverryan
weaverryan
Read Full Comment
Hi Mathias Strasser! Thanks again! At one point, the composer update syntax was "fuzzy" - meaning you could say "doctrine" and it would update all libraries that had "doctrine" in their names. However, it was never ...
weaverryan
weaverryan
Read Full Comment
Hey Dmitriy, Good question! Since slug generated with a listener, it’s not possible to do in doctrine migration. So, you need a so called console migration. It’s a simple Symfony console command where you fetch all ...
... inject the code into Symfony framework. Though, for Doctrine Migrations see https://github.com/doctrine/migrations - that's a standalone library that does not relate to Symfony. Cheers!