1000 search results

…extends `Doctrine\Bundle\FixturesBundle\Fixture` which implements `DependentFixtureInterface`... When we remove extended class - `addReference` method is no longer available. When we remove implementation of `OrderedFixtureInterface`, well it won't be ordered. So it's clearly bug in course code. Probably you should extend `Doctrine\Common…
Hi Diego the doctrine connection had the access to database and in symfony profiler there are two queries that were executed #▼ Time Info 2 1.00 ms SELECT t0.id AS id_1, t0.author_name AS author_name_2, t0.content AS content…
Does stof_doctrine_extensions Bundle need Doctrine extension Bundle ?
When running bin/console doctrine:migrations:migrate on mariadb-server-10.1 (and probably MySQL 5.6) you'll get an error: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes This is related to…
Coding010
Coding010
Read Full Comment
Hello again, installing doctrine-fixture-bundle v2.4 with the cmd: ` composer require --dev doctrine/doctrine-fixtures-bundle 2.4 ` worked for me. But I am still interested in how I can get the more recent version of orm-fixtures-bundle
AndTheGodsMadeLove
AndTheGodsMadeLove
Read Full Comment
bin/console doctrine:fixtures:load PHP Fatal error: Class App\DataFixtures\UserFixture contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (App\DataFixtures\BaseFixture::loadData) in /../../src/DataFixtures/UserFixture.php on line 22 Fatal error: Class App\DataFixtures\UserFixture…
// ... lines 1 - 4
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
// ... lines 6 - 7
/**
* @UniqueEntity(
* fields={"email"},
* message="I think you're already registered!"
* )
*/
class UserRegistrationFormModel
// ... lines 15 - 33
See Code Block in Script
Being a sf + doctrine user for years I could not believe I would learn anything new - I just went for the badge, but you proved me wrong. I still learned a thing or two. Great job guys!
255 lines | src/Entity/User.php
// ... lines 1 - 7
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
// ... lines 9 - 12
/**
// ... line 14
* @UniqueEntity(
* fields={"email"},
* message="I think you're already registered!"
* )
*/
class User implements UserInterface
// ... lines 21 - 255
See Code Block in Script
When running doctrine:fixtures:load, check on what file it stopped. For my it was App\DataFixtures\CommentFixture. To fix it just added dependent fixture: Add getDependencies to App\DataFixtures\CommentFixture (also add implements DependentFixtureInterface). So basicly: class CommentFixture extends BaseFixture implements DependentFixtureInterface { ... public function…
Tomasz P.
Tomasz P.
Read Full Comment
Broken link: https://doctrine-dbal.readthedocs.io/en/latest/reference/data-retrieval-and-manipulation.html
I have used doctrine for years now and I keep learning new things that make it so much better. Thanks. May I ask, when will the next course come out? Should I review the Symfony 3 Forms: Build, Render & Conquer! for the latest info on…
When I run the doctrine:migration:migrate command it comes back with an error: 'User table or view already exists'
Luke Oliver
Luke Oliver
Read Full Comment
…su Doctrine by default doesn't have a replace function, but you can create your own DQL functions, actually this guy already done it: http://stackoverflow.com/a/21652988 You can read more information about creating your own DQL functions here: http://docs.doctrine-project…
MolloKhan
MolloKhan
Read Full Comment
Hi Ryan, How does Doctrine know to query for the Programmer using the `nickname` value? Does it check that the nickname property is part of the Programmer class and then does findOneBy(array('nickname' => $nickname)), or does it need an existing method (findOneByNickname($nickname…
Vladimir Z.
Vladimir Z.
Read Full Comment
After ( bin/console doctrine:migrations:migrate ) I got exception about *foreign key* !
Andrew Grudin
Andrew Grudin
Read Full Comment
Setting the doctrine_cache type to array to "stop logging" is pretty ugly. Why would there not be an "enabled" flag?
Richie Hamburg
Richie Hamburg
Read Full Comment
…workarround. ``` console doctrine:migrations:status``` this gave me the next in line migration version. which was 20160207092254 checked in phpstorm which was the next in line, which was 20160412160008 opened Version20160412160008.php got the version number(without Version) and performed: ``` console doctrine:migrations:execute 20160412160008…
jlchafardet
jlchafardet
Read Full Comment
Hey Peter, Doctrine model, i.e. Genus entity in our case, or any other entity - can't query the database, it's an architectural pattern of Doctrine. To query the database - you need to use entity repository, so you can some default methods in default…
Hey Cesar, With Doctrine you get both ORM and DBAL. We explain ORM in this course, it's higher level and more fun. However, ORM is based on the more lower level like DBAL. Actually, you can think of Doctrine DBAL as about PDO, it…