Questions tagged as 'doctrine2'

1
answer

Revision null when sending the form

I have a form with several embeds. I have the Budget entity, which has oneToMany relation with Revision, and revision has oneToMany with Chapter, Chapter has also oneToMany with another call Requirement, but it is not necessary to inquire more s...
asked by 23.02.2016 / 14:51
1
answer

Detect DOCTRINE date collisions

I have a table TAREAS formed in the following way: +--------+------------+---------------------+---------------------+ | id | informe_id | inicio | fin | +--------+------------+---------------------+----...
asked by 20.07.2017 / 10:59
2
answers

Problem in Symfony 3 with ManyToMany Bidirectional relationship

I'm using Symfony 3 with Doctrine. In my application I have 2 entities: User and Role, and I need to make a bidirectional relationship between both entities from many to many that allows me to relate roles with users both from the User form and...
asked by 09.06.2017 / 17:36
1
answer

Problem with the decimal data type in Doctrine2 and Symfony3

I have an entity that has three fields of decimal type /** * @var decimal * * @ORM\Column(name="cantidad", type="decimal", precision = 3, scale=2) */ private $cantidad; /** * @var decimal * * @ORM\C...
asked by 20.07.2017 / 15:57
2
answers

as I define field timestamp symfony 3 and easyadminbundle

How can I make an entity store a createdAt and updatedAt field with doctrine2 mapped by annotation? ... My entity is User. I'm using easyadminbundle to manage the backend.     
asked by 12.06.2017 / 15:10
1
answer

Symfony Doctrine: Unable to create database

I'm following this tutorial:    link and I get this error:    Could not create database symfony for connection named default An   exception occurred in driver: SQLSTATE [HY000] [1045] Access denied for   user 'root' @ 'localho...
asked by 09.09.2017 / 13:29
2
answers

How to make a UNION query in SYMFONY

How could I do the following query in Symfony SELECT * FROM (( SELECT SUM(o0_.qty) AS sclr_0, o0_.price AS price_1, i1_.numero AS numero_2, i1_.nombre AS nombre_3, i1_.um AS um_4, i1_.id AS id_5 FROM ofer_producto o0_ INNER JOIN inv_producto i...
asked by 26.10.2016 / 18:11
0
answers

optimize DQL doctrine query

I'm trying to optimize this query, which has a subquery: $subQuery = $em ->createQueryBuilder() ->select('o')->distinct() ->from('AppBundle:Report', 'o')...
asked by 16.02.2017 / 13:12
2
answers

Doctrine 2.5 key composite error mapping

Good afternoon I'm doing a project in Symfony 3 in which I use Doctrine 2.5 . In this project I have the following tables: CREATE TABLE companies ( id_company INT NOT NULL AUTO_INCREMENT, id_user INT NOT NULL UNIQUE, name VAR...
asked by 09.11.2016 / 12:09
1
answer

Configure DoctrineExtensions in symfony 2.8 manually

I need help setting DoctrineExtensions ( Gedmo ) manually in Symfony 2.8 Standard . My access to the internet is very limited and I can not use composer. I have in my possession the versions of DoctrineExtensions 2.3...
asked by 11.09.2016 / 03:22