2709 search results for Doctrine

Hey Sung L. Adding extra fields to a "bridge" table when using Doctrine's ManyToMany relationship is not possible, you have to do a workaround. Read my answer here: https://symfonycasts.com/screencast/doctrine ...
MolloKhan
MolloKhan
Read Full Comment
Hey Michel, For me it looks like you don't have Doctrine bundle installed in your project. Could you explain what exactly steps you do to see this error? Did you download the source code of this course? I what directory are you: start/ or finish/? And what command exactly are you executing? Cheers! ...
Hey Chris! Ah, indeed - the MariaDB part might hold the key! Check out this issue: https://github.com/doctrine/dbal/issues/2985 - and the possible fix - https://github.com/symfony/symfony-docs/pull/9547/files - that ...
weaverryan
weaverryan
Read Full Comment
Hey Sung L.! Glad you like it ❤️ It's not a perfect process, but here's how you can import from an existing database https://symfony.com/doc/current/doctrine/reverse_engineering.html You'll need to add the `@ApiResource` annotation by hand after finishing... but that should be it ;) Cheers! ...
weaverryan
weaverryan
Read Full Comment
... idea. Yes, you can use Doctrine event listener to listen, here's an example: https://symfonycasts.com/screencast/symfony3-security/encoding-user-password Cheers!
Hey Gballocc7 I think this use case is complex for doing it with Doctrine ORM, have you tried writing a raw sql? I think it will be easier. If you have problems hydrating the results what you can do is to fetch first all the matching ids and then in a second query fetch just those id objects Cheers! ...
MolloKhan
MolloKhan
Read Full Comment
Hey kubaf Wow, you are totally right. I was on a latest release of DoctrineFixturesBundle where Fixture class doesn't implement DependentFixtureInterface anymore. I think your solution is good enough, just extend from `Doctrine\Common\DataFixtures\AbstractFixture` We will see what we can do about tutorial's code Cheers! ...
MolloKhan
MolloKhan
Read Full Comment
I think everything is good. I compare my code to the code from 1st episode in Doctrine. There are no additional Errors or infos. I looked today on slack site and there are some massages from Kirk :D. The problem is that i do not have any appearing window from slack on my website. ...
... ] Class "AppBundle\DataFixtures\ORM\LoadBasicParkData" can't implement "OrderedFixtureInterface" and "DependentFixtureInterface" at the same time. I use Symfony 3.3.18 and doctrine-fixtures-bundle": "2.4.1" You know why ?
Ohh, you have a good point and probably from a DB point of view that would be the way to go but to be honest I haven't done that on Doctrine, so, I'm not totally sure if it's supported or not (Maybe yes?). If you find more info about it please let me know :) Cheers! ...
MolloKhan
MolloKhan
Read Full Comment
... this out: https://www.doctrine-project.org/projects/doctrine-orm/en/2.6/reference/annotations-reference.html#table Cheers!
MolloKhan
MolloKhan
Read Full Comment
Hello, i am using mysql v.5.7 with dbal v.2.5 even if the is server_version: '5.7' but i am still unable to create the database with the command [Doctrine\DBAL\Exception\ConnectionException] An exception occurred in driver: SQLSTATE[HY000] [1049] Unknown database 'symfony' ...
Hey Carlos, Hm, I think you need to configure a few database connections and Entity Managers in your case, see this article in the docs for more information: https://symfony.com/doc/current/doctrine ...
Hey Peter K. Yeah you have a tricky situation. As I know this cannot be done automatically because this fields are not synced, to sync them you can create Doctrine entity listener, and listen to PreUpdate and probable PrePersist and check your list changes and sync lists. Hope this will help. Cheers! ...
Hey Gballocc7 Just do It! Woops, it's not Nike ads =) You should can easily setup ManyToMany relation, between News entity and Category, and the same way for Warnings entity. Doctrine will create separate join tables so everything will work as you want! Cheers! ...
Hey Vesna! Sorry for the slow response. If you really only need to return the count and the product name, I'd just write this in raw SQL - no great reason to try to put it into DQL/query builder: https://symfonycasts.com/screencast/doctrine-queries/raw-sql-queries Cheers! ...
weaverryan
weaverryan
Read Full Comment
... I haven't been able to execute it successfully yet. There is an issue open regarding this very same point. The maintainer pointed out the test case as reference https://github.com/hautelook/AliceBundle/blob/master/tests/Doctrine/Command/CommandTestCase.php but is not working for me either
danresmejia
danresmejia
Read Full Comment
Could I ask you one more question? For categories, do you use the Tree component of Stof Doctrine Extensions of do you do it on "your own"? What do you suggest to implement categories inside a web project? (By example Categories for space bar articles) ...
... //github.com/doctrine/orm/issues/7416 Why this problem: because on slug there is index, and indexing varchar 255 is prohibited.
Daniel G.
Daniel G.
Read Full Comment
And you are using the CommentRepository in your controller, right? Can you double check that you are on the dev environment? or that you loaded the fixtures for the dev environment Another thing you can check is the profiler at the "Doctrine" tab, so you can see which queries are being executed ...
MolloKhan
MolloKhan
Read Full Comment