Questions tagged as 'doctrine'

1
answer

Doctrine2 using composer namespace error

Hello, I'm creating a file that serves as base class in Entities \ BaseTable.php as follows: <?php namespace Entidades; use Doctrine\Common\Collections\ArrayCollection; /** * @MappedSuperclass */ class BaseTable { /** * @Id @Col...
asked by 01.09.2014 / 22:19
1
answer

Doctrine 2 - Entities in more than one directory

Good morning, I'm starting in Doctrine 2.4 and I'm developing a system where I separate core files from application files, as follows: /root |-- /src |-- /App |-- /Model |-- **(Entidades da Aplicaç...
asked by 03.06.2014 / 13:45
1
answer

Doctrine 2 INNER JOIN with Subquery

I'm migrating my queries to doctrine using QueryBuilder . And I have a inner join query with a subquery , I'd like to know how to do this using doctrine . SELECT p.* FROM produtos p INNER JOIN (...
asked by 10.11.2016 / 20:33
1
answer

How to use the ParamConverter inside the controller or in service

The ParamConverter is a note I use constantly in Symfony to retrieve the data sent already in object, so the parse is made automatic, in my case, just add comment in the method of the respective controller and when receiving the parameter sy...
asked by 18.05.2016 / 21:08
1
answer

Inheritance PHP and Doctrine: Duplicate definition of column

Good afternoon. The following error is occurring: Error: Duplicate definition of column 'num_user' on entity 'User' in a field or discriminator column mapping. My User class extends from OwnGroup. Then the User Class mapping is as f...
asked by 26.07.2016 / 21:49
0
answers

Implementation of Doctrine 2.5 in Laravel 5.1 using the mysql database configuration

I started using the laravel recently and I was able to set up almost everything , but when configuring the database, right after installing Doctrine, it returns me this error:    SQLSTATE [3D000]: Invalid catalog name: 1046 No database sele...
asked by 21.12.2015 / 16:26
1
answer

Persistence with Doctrine does not take data from the object to the insert

I started a new project in PHP where every database is with tables and their columns with different names of classes and their attributes. With the intention of gaining in the productivity of not being renamed I decided to apply Doctrine ORM...
asked by 20.11.2015 / 21:14
1
answer

How to import CSV into Symfony2

I am trying to create a generic form to import the CSV the $ data represents a complete line of csv data. I'm trying to generate a response to register the data using form public function save(\Symfony\Component\Form\Form $form, $data ){...
asked by 20.03.2015 / 11:56
1
answer

Return property in a ManyToMany relationship

I have a ManyToMany relationship between 2 classes. Campannha and Empresa . Annotation of class Campanha looks like this: /** * @ORM\ManyToMany( targetEntity="JN\Entity\Empresas\Empresa") * @ORM\JoinTable( * name=...
asked by 16.03.2015 / 03:00
2
answers

Insert null in a relationship with the doctrine

I have a table of votes and a table of users, where for each vote entered the user can be identified (relationship one-to-many ). If the user does not identify himself, how do I insert NULL into the foreign key of the user? I tried...
asked by 24.04.2015 / 16:18