I need to change an old Symfony 1.4 application so that it’s able to connect to mysql via ssl-connection. I found a lot about this for Symfony >= 2. But unfortunately not for this dusty one. For validation purposes I already made it work by editing ./apps/frontend/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Connection.php to But I wonder if this ugly hack is actually the only solution?
Tag: doctrine
The Symfone “doctrine:fixtures:load” command missing
I have Symfony 3.1 project with Doctrine and doctrine/doctrine-fixtures-bundle and doctrine/data-fixtures installed. However, when i run a console command php bin/console doctrine:fixtures:load i get a message saying that there are no commands defined in the doctrine:fixtures namespace. The class DoctrineBundleFixturesBundleCommandLoadDataFixturesDoctrineCommand exists. Please suggest how to fix that. Answer Run first php bin/console and see if the command appear in the
stored procedure with OUT variable not working with oracle & symfony2
what i need i need to fetch json data from stored procedures i have google a lot but cannot solve problem source code $param1 = ‘abc’; $param2 = ’79’; …
Aliasing fields using partial object syntax + array hydrator in doctrine 2
Is there any way to alias fields when using partial object syntax in Doctrine 2? I know I can do this: $this->createQueryBuilder(‘user’)->select([ ‘user.id AS id’, ‘user.firstName AS …
Semantical Error: Class MailileoBundleEntityMatch has no field or association named getMailid
I went through all similar issues but nothing appears to solve my problem. I’ve put a simple query in my MatchRepository but it throws a semantic error. I’ve double(triple) checked my entity and everything looks fine. It even works fine when I pull all Matches via findAll() and then run a $match->getMailid() The problem appears only in the MatchRepository file.
How to fetch entities in db while using doctrine fixtures?
I have been the ContainerAwareInterface on my LoadAdvert class so I can call and use the EntityManager to retrieve users in the database. However, when executing php bin/console doctrine:fixtures:load, the entity manager retrieves only an empty array, as if there was no user in the db. Answer Here it is how I do it. The main thing is to set
Doctrine migrations table collation
Trying to find a way to programatically create tables with certain collation, but can’t seem to find a way how to do it properly. I am using the “doctrine/doctrine-migrations-bundle”: “2.1.*@dev” and Symfony 2.3, I set up in my config.yml: It creates the database with LATIN1 charset and latin1_swedish_ci as default collation, when I run doctrine:database:create tool. Then I run my
Compare dates between datetimes with Doctrine
I have a Symfony2 application with a table that contains a date field, whose type is DateTime. I need to get all the entities where that field value is now. If I uses the following code, I get 0 results because Doctrine is comparing the DateTime object. I need to only compare year, month, and day, not hours. How can
Memory leak when executing Doctrine query in loop
I’m having trouble in locating the cause for a memory leak in my script. I have a simple repository method which increments a ‘count’ column in my entity by X amount: Problem is, if I call this in a loop the memory usage balloons on every iteration: What am I missing here? I’ve tried ->clear(), as per Doctrine’s advice on
Doctrine2 find by value in field array
i wonder if there is a way to search for a document field looking like : /** * @var array * * @ORMColumn(name=”tags”, type=”array”, nullable=true) */ private $tags; which in database looks …