Hey Kevin,
Yeah, sorry about delays. But I have good news for you! We're working on this tutorial right now with our awesome co-author, and we're going to start releasing this course after Doctrine one. Thanks for your patience!
Cheers! ...
I was just wondering if I could use a Doctrine Entity Listener for the "HasPasswordLIstener" instead of the EventSubscriber. It seems useless that this is called for every entity while the Entity Listener is called only for the User Entity, which is what we want anyway. ...
Hi Ryan,
When I run composer install, it says I have 34 problems. Most of the problems is wrong PHP version. How can I fix this?
`doctrine/common v2.8.1 requires php ~7.1 -> your PHP version (7.0.10) does not satisfy that requirement.`
Best regards,
Dennis ...
... is a special flag that tells the container that this service should be registered as a Doctrine listener
Cheers!
Hey weaverryan, sorry for taking so long to get back. The main issue im having is that I want to use an in memory sqlite db for testing. I need to figure out how I can run my doctrine migrations as part of the tests. ...
Hey notronwest
There is another way to do that. You can change the default repository class binded to all your entities in your "doctrine.yaml" configuration file, something like this:
```
doctrine:
orm ...
Hey jarnstad ,
Ah, unfortunately, not yet... see our roadmap for upcoming screencasts here: https://knpuniversity.com/courses?status=upcoming&sort=popular#all . We're working on Doctrine tutorial, then probably will be ReactJs one, and only then we will switch to the Fixtures.
Cheers! ...
help please, i have this error:
Attempted to load class "User" from namespace "UserBundle\Entity".
Did you forget a "use" statement for e.g. "Symfony\Component\Security\Core\User\User", "Symfony\Bridge\Doctrine\Tests\Fixtures\User", "FOS\UserBundle\Model\User", "FOS\RestBundle\Tests\Fixtures\User" or "AppBundle\Entity\User"? ...
Hey Roman R.
Can you tell me what's actually your problem?
If you need to create multiple relationships to the same entity is totally possible. This example may help you getting an idea of how to do it: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/working-with-associations.html
Cheers! ...
... 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!
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 ...
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! :] ...
... 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 ...
... 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.
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 :) ...
2709
Doctrine
Filter Results