1
vote
1answer
17 views

Symfony 2.3 Entity Boolean Property Allow Only One Row to be True

This should be pretty easy, but I can't seem to find the answer... What I'm trying to do is create a page bundle; that parts been pretty easy. I've added an isHome column to my database. Basically I ...
0
votes
1answer
23 views

How get the nearest (latitude, longitude) entities with Doctrine2 and MySQL? [on hold]

I have and entity with the attributes latitude and longitude and I want to get the N entities closest to the point (LAT, LNG). How I can get them using Doctrine 2?
1
vote
2answers
26 views

Symfony2.3 raw sql query with IN Clause

I was trying to a run raw sql query with doctrine entitymanager for IN clause as shown below. $idSArray = Array ( [0] => 1 [1] => 2 ) $stmt = ...
0
votes
0answers
14 views

symfony db and doctrine user structure

I have a site with 2 types of users: searchers and workers. My firewall is on all the site and both of the types are from the the same provider (same table in DB). The problem is that there is one ...
0
votes
0answers
48 views

Symfony2 blank page

Using Symfony2, Doctrine2 and MySQL, I am going through some trouble. Imagine some simple doctrine generated entity with 14 elements in database that have to be listed in a certain myPage document. ...
0
votes
1answer
29 views

Why can't doctrine purge my database? Syntax error with doctrine

I keep getting this error whenever I try to load my data fixtures: [Doctrine\DBAL\DBALException] An exception occurred while executing 'DELETE FROM ...
0
votes
0answers
27 views

Symfony2 Doctrine2 ORM Id association

Somebody know a way for add the "PK" assignment to the below Entity-Object of doctrine 2? /** * * @ORM\ManyToOne(targetEntity="ProductData", inversedBy="products_pi", fetch="EAGER") ...
0
votes
1answer
18 views

Symfony2.2 Swiftmailer not working in AWS-EC2 Server Site

I am working on a symfony 2.2 project Site in which I am using swift mailer for sending the mail ; In Parameter.yml , configuration is as follows: database_driver: pdo_mysql database_host: ...
0
votes
1answer
25 views

Symfony2 and Doctrine: how to use findOneBy method taking capitals into account

Using Symfony2, Doctrine and MySQL, I am using findOneBy method. I need it to take capitals into account when talking about string criteria fields. Example: imagine I have this path field in some ...
0
votes
1answer
28 views

Syfmony2 - custom query in repository for a many to many relation

I have a manyToMany relationship between players and coaches. Each player can have many coaches and each coach can have many players. I want to create custom query to recuperate all the players that ...
1
vote
1answer
53 views

How can I get an entity from Doctrine Fixture reference?

I have added data fixtures in my project that relies on referencing entity objects from each other. In data fixture one, I have added entity references such as: // ...
0
votes
1answer
39 views

Many-To-Many + WHERE field <> value

I have "Post" entity with relation manyToMany /** * @ORM\ManyToMany(targetEntity="Core\CoreBundle\Entity\User", cascade={"persist", "remove", "merge"}) * ...
0
votes
1answer
49 views

Search only by time in DateTime field in Symfony2 and Doctrine

I use Symfony 2 and Doctrine. In my database MySQL, I have a field of type DateTime. In my Repository file, by using QueryBuilder, I would like to search in this table only by date (without time) and ...
1
vote
3answers
38 views

Ordering date from n+1 to n-1 in Doctrine2

I requested this yesterday : SQL Ordering Data from row "n+1" to "n-1" But I'm using doctrine2 and in DQL, Case statement isn't available. So how could I do this in DQL ? Thank ...
0
votes
1answer
36 views

Doctrine dynamic Entity attributes

In Doctrine2 I have a class that has an attribute that's calculated using a complex SQL query. That attribute is called "duplicate" I don't want to persist this value in my database and I want it to ...
0
votes
1answer
31 views

OrderBy a relation in an entity

I've got a headache :) Been trying to google this for an hour, and before that trying to solve it for an hour. I've got an entity A with a ManyToOne relation to another entity B. I need to sort a ...
0
votes
1answer
34 views

How can I select the users which are belonging to group A?

How can I select the users which are belonging to group A? My tables are below. my user table. ID | name |sex 1 | bob |1 2 | kayo |2 3 | ken |1 my fos_group table ID | name 1 | student 2 ...
0
votes
1answer
67 views

Doctrine Data Import - Common way to do a fallback?

I write a symfony command executed as a daily cronjob. The task is to import data from different CSV-Files into the database (clean tables, no update). Until now this is pretty easy but i need also a ...
0
votes
2answers
26 views

Symfony2 - Testing folder

I have a properly installed Symfony2 environment for my web application, which is connected to a certain mysql database. I am trying to set a physically separated Testing Environment to use it as the ...
1
vote
1answer
50 views

How can I generate salt and confirmation_token entries for migrated users with FOSUserBundle

I am resurrecting a website that has been down for a few years and I am migrating everything to Symfony2. I was able to get all of my old user database entries into the fos_user table. The only ...
0
votes
2answers
37 views

How to make symfony2 to set time_zone in mysql?

How can I set custom drivers options in symfony2 In this case I want to run set_timezone in mysql as part on the connection initialization.
0
votes
1answer
87 views

How to delete video from Vimeo account through vimeo api

In my previous asked question How to upload video in vimeo account through vimeo api in Symfony 2.2 which is now closed . Now I have one more requirement that I want to delete the uploaded video ...
1
vote
1answer
98 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
68 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
48 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
3answers
136 views

Retrieve the Data in Tree structure in php

Currently i am working on creating apis in symfony2.2 framework. I have to retrieve a bunch of questions and answers from the database. Q1 ...
-2
votes
1answer
54 views

PDO inserts wrong values [closed]

I am using symfony2 and PDO to insert values to a database. private static function insertAction($action, $conn){ $sql = "INSERT INTO BANKACTIONS (clientName, actionDate, currency, value, ...
1
vote
1answer
65 views

NOT IN for multi field DQL Doctrine2

I just want to know how to do something like this in doctrine2 select e from \Entity e where e.field1, e.field2 NOT IN (select e2.field1, e2.field2 from \Entity e2 where condition ) ...
1
vote
2answers
136 views

How to handle object ID's in ember.js?

I was just experimenting building a tiny app with Emberjs as my frontend framework. All the app is, is a list which I can add names to with a textbox and button, then remove names from the list by ...
-2
votes
1answer
66 views

Migration from symfony to wordpress [closed]

I want to migrate existing website to wordpress which is developed using symfony framework. what are the steps or things I need to consider while doing this migration? Also, I want my new fron-tend ...
0
votes
1answer
947 views

SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: YES) Symfony2

I tried to create my DB with Symfony2. I typed the command: php app/console doctrine:create:database The result is: Could not create database for connection named `jobeet` SQLSTATE[28000] [1045] ...
0
votes
0answers
47 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
1answer
69 views

Doctrine/MySQL: field missing in ResultSetMapping

I have a native query an want to fill a ResultSetMapping object with the results of my query. Everything works as expected, but the field "distance". The field in the resulting array is always empty. ...
0
votes
1answer
32 views

ManyToMany association query

I have a question based on the Doctrine 2.X ManyToMany association. My data structure: news: id: INT program_site: id: INT news_program_site: newsId: INT programSiteId: INT ...
-1
votes
1answer
54 views

Doctrine join 4 entities and order by datetime

I would like to join 4 entities that each have upload_datetime column. Then i would like to order them by that datetime column descending and get only 7 records. Right now i have this: return ...
0
votes
2answers
129 views

Doctrine2 with Symfony2 not recognizing db charset and collation

I am trying to get Doctrine2 to work properly with a mysql db in Symfony2 on a debian squeeze system. The charset and collation of the DB are set to utf8 and utf8_general_ci and the db is created ...
0
votes
0answers
42 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
2answers
65 views

Symfony2 structure setup

Im almost new to Symfony2, I understand the Bundle, entity etc. But my problem is with the structure. I created a local virtualservers for development and i can't start until i dont know what im ...
0
votes
2answers
41 views

deleteAction: why is removing categories associated to this Blog?

I'm working on this interface using Symfony2, here I've blogs and categories associated to them, sometimes we want to remove Blogs that are not longer valid, so I want to remove just the blog, I added ...
0
votes
2answers
207 views

Symfony2 / Doctrine Relationship Mapping

i'm building my first application with the syfmony2 framework. Now i stick a little bit on how to get data from my Database. First here a my tables (only important fields) # customer customer_id | ...
0
votes
1answer
98 views

MySQL : Memory allocation issue

I'm using WAMP on my computer, and when I run an algorithm that imports data from an Excel file, it just takes too long. In the first place, it throws me an error that there's not enough memory. Then, ...
0
votes
2answers
207 views

MARKER constant override Symfony2 error

So, I have a categories entity set up with a parent_id being self-references. But for some reason when I save the entry in the form I get this error. Fatal error: Cannot inherit previously-inherited ...
0
votes
1answer
44 views

Symfony2 connecting to database via SSH tunneling?

How can I connect to a remote database via SSH tunneling in Symfony2? I've found the PHP snippet, but how can I integrate it in Symfony <?php $smysql = mysql_connect( "127.0.0.1:3307", ...
0
votes
1answer
69 views

Live search using Symfony2

I am creating a symfony2 project where I have a User table. I have to create a search box which shows suggestions while the user types in the name. And the user should only be able to select from the ...
-3
votes
1answer
73 views

PDOException Integrity constraint violation

I'm working with Symfony2 and when I execute doctrine:schema:update I get the following error [PDOException] SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a ...
1
vote
0answers
243 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 = ...
0
votes
0answers
31 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
2answers
62 views

innerJoin Query in Symfony2

I mysql query : SELECT p.name, c.id FROM customer c INNER JOIN sales_order so ON so.customer_id=c.id INNER JOIN sales_order_item soi ON so.id=soi.sales_order_id INNER JOIN product p ON ...
0
votes
0answers
44 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
1answer
31 views

Symfony2 Application : Host database only

So I want to create this application using Symfony2. I don't want to host it online but I want to work on a database online (Cloud of Mysql or something similar). Is that possible ? if yes, how can I ...

1 2 3 4 5
15 30 50 per page