Tagged Questions
2
votes
0answers
162 views
Storing “CASE WHEN” condition in Doctrine2 entity
As of Doctrine 2.1, the CASE WHEN statement is supported but there isn't a lot of documentation on it. My goal is to set a boolean value to tell if a photo has been favorited by a user:
...
1
vote
0answers
160 views
Symfony2 / Doctrine2 - get sql min,max date values
My problem is when i want to get the max or the min date value between 2013-04-08,2013-04-07 and 2013-04-06, the response is always 2013-04-08 for the min and the max
my script :
$max_date = ...
1
vote
0answers
63 views
Symfony2 Functional Test - GeomFromText / SQLite
I have a situation where I need to write functional/unit tests on entities that rely on MySQL's spatial functions. However, my test environment uses SQLite for testing (Using ...
1
vote
0answers
113 views
How to generate timetable form in Symfony2
I am trying to create some timetable with administration and I have looked all over the internet and did not find the answer or tutorial how to do such a thing in Symfony2.
The thing is:
I have 3 ...
1
vote
0answers
123 views
Symfony2, FOSUserBundle - fetching userdata doesn't close connection
The FOSUserBundle is fetching userdata on every request.
The problem is that everytime after fetching data it leaves the mysql connection open.
Doctrine doesn't close the connection.
So after a while ...
1
vote
0answers
83 views
Doctrine2 insert fails silently, only on certain records
I have the following code which results sometimes in a silent failure:
public function updateCoreGameTableIfNecessary($coreEm)
{
$game = $this->getCoreGameRecord($coreEm);
if (!$game) ...
1
vote
0answers
947 views
Symfony2 query error (while the same works under Doctrine2)
I am using both Doctrine2 and Symfony2 but Symfony2 fails me at a task I am able to accomplish in Doctrine2 (the 'standalone' version).
In Doctrine2:
I have 2 classes, Outcome, Ticket as such:
...
0
votes
0answers
47 views
How to connect to MySQL using SSL on symfony/doctrine
I am trying to connect to MySQL that has SSL enabled.
I am using Symfony2 framework with Doctrine.
In plain PHP, I can achieve this with
$link = ...
0
votes
0answers
38 views
How to connect the existing database with the OrangeHRM
I know OrangeHRM uses database named "orangehrm_mysql" . I want to connect an other existing database (of MySql).
I m confused here how to connect the my own database with the OrangeHRM.
I have ...
0
votes
0answers
39 views
symfony2 and doctrine2 order results and group query
I have a table of logs which stores different types of logs. I am trying to write a query which will return me only the last log for each type.
Table:
id|log_type|log_info|dateline
...
0
votes
0answers
35 views
Non-Logic output using Doctrine2 mapping convert with --filter
I'm using Symfony2 and Doctrine to generate model from existing database.
I just want generate one entity from one table. so I input as:
php app/console doctrine:mapping:convert yml ...
0
votes
0answers
30 views
Where the best place to put an LOAD DATA INFILE query with doctrine2?
I perform mass insert by using LOAD DATA INFILE (MySQL) and Doctrine 2
But actually I don't know where this query has to be placed in order to respect Doctrine architecture?
an Entity Manager?
a ...
0
votes
0answers
28 views
Nested set model with two types of data
I am rebuilding a wiki app.
In my current version, I have one articles table. Articles are hierarchical: each has a parent. I use an adjacency list model to store the hierarchy, so each row has both ...
0
votes
0answers
41 views
Why Doctrine ORM put null to relation field when persist object?
There is part of my yml-mapping info:
Dog:
oneToMany:
dogs:
targetEntity: Dog
mappedBy: post
cascade:
- persist
Post:
...
0
votes
0answers
30 views
sqldump not working in a controller
I am trying to execute a command to backup my database in Symfony controller
$creatBackup = "mysqldump -u ".$user." --password=".$password." ".$dbName." > ".$sqlFile;
exec($creatBackup);
But It ...