2708 search results for Doctrine

hey sadikoff thanks for your reply. I installed the exact version and now I have "doctrine/doctrine-fixtures-bundle": "2.4.1" in composer.json, but I still get the same exact error as before... ...
Hi A little update for composer migrations dependencies. Currently composer try to install ^3.1. To make it work (and be consistent with finish project) I use composer require doctrine/doctrine-migrations-bundle "^2.0" ...
atournayre
atournayre
Read Full Comment
Hey Georg It seems like you figured it out but in any case, I'll leave you here the documentation of how to configure multiple EntityManagers on Symfony + Doctrine https://symfony.com/doc/current/doctrine/multiple_entity_managers.html Cheers! ...
MolloKhan
MolloKhan
Read Full Comment
Thank you guys, so tricky, does there any difference between ? ``` ->leftJoin( 'AppBundle:GenusNote', 'genus_note', \Doctrine\ORM\Query\Expr\Join::WITH, 'genus = genus_note.genus ...
Hi! Just an update - this should not be a problem anymore - we've been waiting for 2 new releases (from doctrine/extensions and stof-doctrine-extensions-bundle) and both have now been released. 🎉 Cheers! ...
weaverryan
weaverryan
Read Full Comment
Found A Solution, you simply need to downgrade the doctrine/common to 2.13 so that it matches the Gedmo required version and the extensions bundle: composer require doctrine/common:^2.13.3 --update-with-dependencies and you're OK to go. ...
Hi, this might be a solution for you: https://github.com/Symplify/ModularDoctrineFilters It doesn't depend on Controller, nor Doctrine yaml configuration, nor Doctrine bundle. It is standalone and easily portable to any project. ...
Tomáš Votruba
Tomáš Votruba
Read Full Comment
i already run the composer require doctrine/doctrine-migrations-bundle "^3.0". But when trying again the php bin/console make:migration still come up with the [ERROR] Missing package: to use the make:migration command ...
Charlene Eboña
Charlene Eboña
Read Full Comment
Hey jpfortuno As far as I know, Doctrine refactored its namespace in a recent version. The old namespace is `Doctrine\Common\Persistence\ObjectManager` and now you should use the other one. I believe they didn't change any behavior Cheers! ...
MolloKhan
MolloKhan
Read Full Comment
For Symfony 5, use the Doctrine Paginator https://www.doctrine-project.org/projects/doctrine-orm/en/2.7/tutorials/pagination.html - Fabien's book (section 10.6 Paginating the Comments) has the example which matches this chapter fairly closely. ...
Edward B.
Edward B.
Read Full Comment
Thank you anyways, I found the answer to my question here https://www.doctrine-project.org/projects/doctrine-orm/en/2.6/reference/basic-mapping.html#identifiers-primary-keys so it is within doctrine document. ...
A little bit more details: Uncaught PHP Exception ErrorException: "Notice: Undefined index: 000000002e4d2d6e0000000027619249" at /vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php line 2997 this is about these lines ...
... Yes, it's possible but it's a feature coming from Doctrine actually. Give it a check to this docs: https://www.doctrine-project.org/projects/doctrine-orm/en/2.6/reference/transactions-and-concurrency.html
MolloKhan
MolloKhan
Read Full Comment
Hey Ahmed, Could you clarify what exactly "Doctrine extension Bundle"? Yes, StofDoctrineExtensionsBundle requires "gedmo/doctrine-extensions" package as the bundle is just a wrapper for that library that has integration with Symfony if you mean this. Cheers! ...
Hey radone! Indeed - looks like a bug with Doctrine and Mariadb - thanks for sharing. I'd be interested if the last link / solution works. It's unfortunate, either way - Doctrine usually does this stuff *really* well. Cheers! ...
weaverryan
weaverryan
Read Full Comment
... btw, if I'm not mistaken, the same problem occurs with the codebase of previous tutorial 'Doctrine & The Database' https://symfonycasts.com/screencast/symfony-doctrine/install; but I'm not 100% sure about it
Yaroslav Y.
Yaroslav Y.
Read Full Comment
Hello, i am getting this error: Fatal error: Uncaught exception 'PDOException' with message 'could not find driver' in /usr/share/nginx/html/test/rest/rest/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:40 Stack trace: #0 ...
Hey Jorge Yeah, testing in Symfony4 got a bit weirder... but anyways, you only have to tweak your Doctrine config for your test environment, like this: ``` // config/packages/test/doctrine.yaml doctrine: dbal: url: '%env(resolve:DATABASE_URL)%_test' ``` Cheers! ...
MolloKhan
MolloKhan
Read Full Comment
25 lines | src/DataFixtures/AppFixtures.php
// ... lines 1 - 2
namespace App\DataFixtures;
use App\Entity\Question;
use App\Factory\QuestionFactory;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Persistence\ObjectManager;
class AppFixtures extends Fixture
{
public function load(ObjectManager $manager)
{
QuestionFactory::createMany(20);
QuestionFactory::new()
->unpublished()
->many(5)
->create()
;
$manager->flush();
}
}
See Code Block in Script
18 lines | src/DataFixtures/AppFixtures.php
// ... lines 1 - 2
namespace App\DataFixtures;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Common\Persistence\ObjectManager;
class AppFixtures extends Fixture
{
public function load(ObjectManager $manager)
{
// $product = new Product();
// $manager->persist($product);
$manager->flush();
}
}
See Code Block in Script