2709 search results for Doctrine

Hello. Please, can you tell me how to custom a query in the EntityType using DBAL? I have tried following the explanation in https://knpuniversity.com/screencast/doctrine-queries/raw-sql-queries but it was not successful. I hope you can help me. ...
Hi there I want to eliminate duplication for importing CSV, and Replace Into Mysql raw query kinda help that. Is there way I can write Replace into Doctrine? If not, what is the steps to write raw query for Replace into? passing field values into Repository function and append to raw query? Not so sure, need help :) ...
I got this error, anybody can help ? ContextErrorException: Catchable Fatal Error: Argument 2 passed to XX\XXXBundle\EventListener\CurrentSiteListener::__construct() must be an instance of Doctrine\ORM\EntityManager ...
Guys, i just finished Mastering Doctrine Relationships in Symfony and it looks like getting harder to me. So i need your recommendations, what should i do for next step? Should i go for next tutorial or make my own project using what i learnt and get everything done? ...
Hey Terry, Actually, Doctrine Lifecycle Callbacks are fine and you can use it as well, but they have some limitation like you can't inject other services into the entity. That's why listeners help with it - we can do ...
Hey Dominik, Actually, the faster way is the \@OrderBy() annotation, not \@OrderedBy(). Probably that was the case why you don't see any changes. But if you add `@ORM\OrderBy({"name": "ASC"})` annotation to the field - it should do the trick. Don't forget to "use Doctrine\ORM\Mapping as ORM;" namespace. Cheers! ...
One question: at this point the list of studiedGenuses in the UserEditForm ist unordered. I created a queryBuilder in the GenusRepository to solve this. Is there a faster way to solve this simple order thing? The Doctrine "OrderedBy" annotation does not seem to help in this case. It's already set. ...
Hey Gremet, If this table was generated with Doctrine - most likely so. You can easily check it by yourselves: when DB credentials is pointed, execute the next command: ``` $ bin/console doctrine:schema:validate ``` It will show you whether your DB schema is OK. Cheers! ...
... information about relationships here: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/association-mapping.html#one-to-many-self-referencing Have a nice day!
MolloKhan
MolloKhan
Read Full Comment
I still use Codeigniter for the primary project i work on. I am starting to look at how i might rewrite that in Symfony. The problem is the 150 existing tables i have. it would take some time to re write them in Doctrine. ...
Simon Carr
Simon Carr
Read Full Comment
Hey Max, We just want to make our URLs more readable, because IDs is something internal. Here's my expanded answer about it: https://knpuniversity.com/screencast/symfony-doctrine/show-404#comment-3109945782 If you will still have any questions - let me know! Cheers! ...
Hey Richard , Good question! That's because you change implementation not Doctrine metadata ;) If you set properties with default values it affects only your classes, not database. If you want to change schema, do it in annotation: ``` @ORM\Column(... , options={"default" : 1}) ``` Cheers! ...
Hi Ryan, i get an error when i want to install it.. [Doctrine\Common\Annotations\AnnotationException] You have to enable opcache.load_comments=1 or zend_optimizerplus.load_comments=1 ...
Henri Tompodung
Henri Tompodung
Read Full Comment
I got this on composer install: [Doctrine\Common\Annotations\AnnotationException] You have to enable opcache.load_comments=1 or zend_optimizerplus.load_comments=1. Script Sensio\Bundle\DistributionBundle\Composer ...
Ryan Pardey
Ryan Pardey
Read Full Comment
... (the current stable), we talk about it in our Symfony series: https://knpuniversity.com/screencast/symfony-doctrine/fixtures-alice Cheers!
weaverryan
weaverryan
Read Full Comment
Hi Ryan Yes I have this error when I run the doctrine command. I use MySQL and I change the relation in Genus and User by the OneToMany. I do exactly the same as the tutorial but if I rename my old genus_scientist table the migration is ok. I will check again this evening. Thanks again for your really awesome works. Cheers ...
Filters are grate! But I can't find any info about how to set one filter to one query many times with different parameters (( Please help me if you can. Deadline is killing me )) I made Q at Stackoverflow http://stackoverflow.com/questions/40034291/array-as-parameter-in-doctrine-sqlfilter ...
... for me -- all those is_publish = 1) How does Doctrine know that we actually wanted to *group* them? I mean, without "GROUP BY g.name" line? ...
Maksym Minenko
Maksym Minenko
Read Full Comment
... comment for some more details about that: https://knpuniversity.com/screencast/doctrine-relations/query-with-join#comment-2870919195 Cheers!
weaverryan
weaverryan
Read Full Comment
Hey Victor, aaa I see thank you for explaining that. I dropped the table and I ran migration but now getting this error: [Doctrine\DBAL\Exception\ConnectionException] An ...