2709 search results for Doctrine

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 ...
MolloKhan
MolloKhan
Read Full Comment
... information about it here: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/working-with-associations.html#orphan-removal Or even better, watch Ryan explaining it: https://knpuniversity.com/screencast/collections/collection-delete-orphan-removal Cheers!
MolloKhan
MolloKhan
Read Full Comment
... remove everything in the cache folder with the next command: ``` rm -rf var/cache/* ``` Btw, do you use any bytecode cache engines for doctrine annotations, like OPCache or APCu? If so, you need manually clear that cache as well. Cheers!
Hey Fenring, I personally don't use AliceBundle in my unit tests, could you look at this thread, maybe this will help to fix your problem: https://knpuniversity.com/screencast/symfony-doctrine/fixtures-alice#comment ...
Hey Jian! When you haven't hydrated a relationship of an object (in this case User - StudiedGenuses), Doctrine creates and sets a "Proxy" into that property via "Reflection" by default, so when you use that property ...
MolloKhan
MolloKhan
Read Full Comment
Hi. I want to tell you that this track explains Symphony in a really friendly way. However, after this Doctrine course, I prefer to use plane PHP for connecting to my database (keep things simpler). But I wonder if I ...
... AUTO_INCREMENT NOT N....' 'SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'genus' already exists...' '[Doctrine\DBAL\Driver\PDOException] SQLSTATE[42S01]: Base table or view alrea dy exists: 1050 Table ...
Julia Shishik
Julia Shishik
Read Full Comment
Hey Claire! In this course we don't go through deleting a Genus, but there is other tutorial where we cover a lot more about working with entities "Doctrine Collections", it is a bit more advance topic but you can find ...
MolloKhan
MolloKhan
Read Full Comment
Hey Julien! Indeed there are many ways of doing it, but I preffer using a setter because its more explicit in what are you doing. Also there is a Doctrine Extension that might help you "Blameable" it works like magic ...
MolloKhan
MolloKhan
Read Full Comment
Hi there! Hmm, that's interesting - thanks for sharing it! Yes, your description of "it persists, but doesn't update" is very consistent with the situation where Doctrine thinks that your entity is unchanged (and so ...
weaverryan
weaverryan
Read Full Comment
... `AppBundle\Entity` In theory, I think Doctrine could probably throw an error, instead of silently not finding your class, but there may be some subtle reason why it's not able to do that. Update this namespace and you should be golden :). Cheers!
weaverryan
weaverryan
Read Full Comment
... fact, it fits the "smart reference" proxy pattern that Marco (core Doctrine contributor) talks about in his presentation here: http://ocramius.github.io/presentations/proxy-pattern-in-php/#/66 Cheers! ...
weaverryan
weaverryan
Read Full Comment
... and, if you have setup inverse side, i.e. OneToMany relationship for the Category - you can get all products of a category. See the https://knpuniversity.com/screencast/doctrine-relations/many-to-one-relation for the real example. Cheers!
When I configure autowire i get an error jwt_token_authenticator: class: AppBundle\Security\JwtTokenAuthenticator autowire: true Unable to autowire argument of type "Doctrine\ORM\EntityManager ...
Zuhayer Tahir
Zuhayer Tahir
Read Full Comment
Ah I see.. So this alias is arbitrary and it's set for the first time when you call "createQueryBuilder()" if you use Doctrine query builder, e.g. "$this->createQueryBuilder('cat')", where `cat` is the alias of table ...
in Symfony 2.8 I had to add @ORM\JoinColumn(onDelete="SET NULL") To the $owner variable. Before a SQL error appeared: [Doctrine\DBAL\Exception\ForeignKeyConstraintViolationException] An exception ...
... [Doctrine\DBAL\Exception\InvalidFieldNameException] An exception occurred while executing 'INSERT INTO genus (name, species_count, fun_fact ...
Daan Hage
Daan Hage
Read Full Comment
Hi there, great tutorials really !! I was wondering how you would deal with entity inheritance. Let's say you have a User Entity and a Player Entity extending User (based on a doctrine class table inheritance). How ...
Ryan, it worked. You re Genus. lol. Thanks. However l have a new challenges. 1.how do i use exiting database in my projects instead of recreating using doctrine. 2. i have update my database with birthday. l get ...
Benson Twumasi
Benson Twumasi
Read Full Comment
Hi Ryan, why don't you use the lifecycle callbacks right on the entity? F.e.: namespace AppBundle\Entity; use Doctrine\ORM\Mapping as ORM; use Symfony\Component\Validator\Constraints as Assert; /** * User ...
Dennis Biedermann
Dennis Biedermann
Read Full Comment