1000 search results

150 lines | src/Entity/CheeseListing.php
// ... lines 1 - 7
use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\RangeFilter;
// ... lines 9 - 14
/**
* @ApiResource(
// ... lines 17 - 27
* @ApiFilter(RangeFilter::class, properties={"price"})
// ... line 29
*/
class CheeseListing
// ... lines 32 - 150
See Code Block in Script
146 lines | src/Entity/CheeseListing.php
// ... lines 1 - 6
use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\BooleanFilter;
// ... lines 8 - 146
See Code Block in Script
148 lines | src/Entity/CheeseListing.php
// ... lines 1 - 7
use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter;
// ... lines 9 - 13
/**
// ... lines 15 - 25
* @ApiFilter(SearchFilter::class, properties={"title": "partial"})
// ... line 27
*/
class CheeseListing
// ... lines 30 - 148
See Code Block in Script
Hey Gballocc7 Doctrine is expecting an entity object instead of an ID. Do that change and try again :) Cheers!
MolloKhan
MolloKhan
Read Full Comment
…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