2726 search results for Doctrine

... just in case, try using the connection for executing the query as shown in this video: https://knpuniversity.com/screencast/doctrine-queries/raw-sql-queries Cheers!
MolloKhan
MolloKhan
Read Full Comment
Hey MolloKhan Thanks for replying. You mean in the context of Doctrine this would be like: ` return $this->createQueryBuilder('e') ->where('e.name = :name AND (e.role = :role OR e.role = :anotherRole) AND ...
Junaid Farooq
Junaid Farooq
Read Full Comment
Duplicate of: https://knpuniversity.com/screencast/doctrine-queries/and-where-or-where#comment-3757425679 Hey Nizar , We're tracking all the Disqus comments, so don't need to duplicate your question multiple times ...
Hey Ali, From the docs: https://symfony.com/doc/current/doctrine/multiple_entity_managers.html - I see: > Entities cannot define associations across different entity managers. If you need that, there are several ...
Hey Szymon, Ah, ok, good thinking :) Hm, this definitely should work. Please, try this config: ``` doctrine: orm: dql: datetime_functions: strtodate: DoctrineExtensions\Query ...
... register custom DQL functions you need, see docs for more information: http://symfony.com/doc/current/doctrine/custom_dql_functions.html Cheers!
Hey there! I have a question about entities id's column I already have an users table in my project and it's ID is not an "AUTO_INCREMENT" id, it is a custom varchar ID Is it possible to change the auto generated ID column of Doctrine to this one ? Thanks for your time! :] ...
MolloKhan
MolloKhan
Read Full Comment
... I've someone gets the error: Type error: Argument 1 passed to AppBundle\Form\GenusFormType::AppBundle\Form\{closure}() must be an instance of AppBundle\Repository\SubFamilyRepository, instance of Doctrine\ORM ...
Hey Knayz! A forum-style is a great idea. We actually *are* going to have something like that... and a lot more :). We'll build on project through multiple different courses, and it will eventually have Doctrine, forms ...
weaverryan
weaverryan
Read Full Comment
... Hi! I didn't realize at first but when you use "length" filter it force Doctrine to do an extra query per event. Is there any form to avoid those extra queries ? I would like something like a "$countAttendies" property in the Event entity, but I'm just saying Thanks in advance.
MolloKhan
MolloKhan
Read Full Comment
Foreign keys (for relationships) and primary keys should be managed automatically by Doctrine, but if you want to index a field, you will have to do it as you said above. I'm not an expert about how to manage indexes, but maybe if you tell me more about your use case, I'll be able to help you more :) ...
MolloKhan
MolloKhan
Read Full Comment
Hey Axa! Normally you don't have to worry about indexes, Doctrine will take care for you. Unless you already have a running app, and you already configured you DB, in that case, I think you will have to specify your indexes for your tables, but I'm not 100% sure about this (I'm just guessing) Cheers! ...
MolloKhan
MolloKhan
Read Full Comment
... //knpuniversity.com/screencast/symfony-doctrine/dummy-data. Basically, we recommend using the older version for following the tutorial :). Cheers!
weaverryan
weaverryan
Read Full Comment
Hey Dennis E. Yeah, ManyToMay relationships are not used very often, but when you have a solid use case (like in your case), you just go for it :) Have you watched our tutorial about doctrine collections? I believe you will find it useful https://knpuniversity.com/screencast/collections Cheers! ...
MolloKhan
MolloKhan
Read Full Comment
... ="discr", type="string") * @DiscriminatorMap({"person" = "Person", "employee" = "Employee"}) */ ``` You can follow the steps here: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/inheritance-mapping.html#single-table-inheritance Cheers!
MolloKhan
MolloKhan
Read Full Comment
@ 4:00 when you set Collection, it went WAY too fast, that you actually used phpStorm Auto-complete to add use statement for Doctrine\Common\Collection. Am I the only one, that thinks these tutoials sometimes write too ...
CISVHenriksen
CISVHenriksen
Read Full Comment
Hey guys, quick doctrine migration question. Is there a way to specify executing the last created diff? If there are old diffs in my DoctrineMigrations directory and I don't delete them it tries to run those before the latest diff. Is that normal behavior? ...
You would only have to type-hint your argument, something like this: ``` use Doctrine\ORM\EntityManager ... class ReportManager { public function __construct(EntityManager $em ...
MolloKhan
MolloKhan
Read Full Comment
... /questions/46342803/doctrine-reusable-criteria-in-entity-and-repository-with-joins Maybe someone has done this before or can give me a better solution to this.
This one is : [Doctrine\Common\Annotations\AnnotationException] You have to enable opcache.load_comments=1 or zend_optimizerplus.load_comments=1. Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler ...
Tabla Mihai
Tabla Mihai
Read Full Comment