Questions tagged as 'doctrine-2'

1
answer

How to use Filters in Doctrine?

I have the Entities I did in Doctrine, and I also have the DAOS, which is where those queries get. I have an API where the user can use Query Parameters as follows:    link The query returns everything but if user puts this parameter...
asked by 21.09.2017 / 14:46
0
answers

Allowed memory size of 33554432 bytes exhausted

I have a problem when I try to run my application, because then I have an application made with doctrine + php and a while ago started to give this error: PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate...
asked by 22.06.2017 / 22:15
1
answer

Using Two Fields in a ManyToOne Relationship

The following relationship exists between two entities: class Clients { //... /** * Dealership id * * @ManyToOne(targetEntity="Dealerships", inversedBy="clients", fetch="EXTRA_LAZY") * @JoinColumn(name="dealership...
asked by 23.06.2016 / 16:54
1
answer

Create query with date range in doctrine 2.0

I'm trying to get the records that I have processed (DateTime) less than 2 days from the current date. I'm starting from the following reasoning. public function obtemSolicitacoesAntigasParaDeletar($executar = true){ $qb = $this->...
asked by 24.02.2016 / 15:21
0
answers

Doctrine2 + pdo_sqlsrv createQueryBuilder Order By with varchar field does not work

I'm creating a method that gets values for createQueryBuilder () coming by parameters. I tested it in my local database with pdo_mysql driver and it worked perfectly, by ordering both an int (id) field and a varchar (title) type field. Howe...
asked by 02.12.2015 / 20:44
0
answers

Zf2 and "doctrine-module" return error: No Metadata Classes to process

I'm having trouble when I'm going to run the following command on the terminal: vendor/bin/doctrine-module orm:convert-mapping --filter="Category" --from-database annotation --namespace="Categoria\Entity\" module/Categoria/src The following...
asked by 02.11.2015 / 01:49
0
answers

Symfony2 - Problems with Doctrine2's PreUpdate

My entity Budget has some methods that run on PrePersist and PreUpdate . They are: /** * @return \DateTime */ public function generateNextPaymentDate() { if ($this->getStartsAt() !== null) { $date = new \Da...
asked by 02.11.2015 / 02:07
1
answer

Update an entity after inserting data into another

I urgently need to find some way to solve this problem that has been holding me for over a week. Once solved, I believe I can use this medium to do other operations that my system will have. I have two tables, one call from Client and anoth...
asked by 10.09.2015 / 01:51
2
answers

How to return only one column

Personal I have the following query done. $ent->createQueryBuilder('t') ->select('count(t.id)') ->join('t.categoria', 'c') ->join('t.noticia', 'n') ->groupBy('n.id'...
asked by 11.05.2015 / 20:16
0
answers

Doctrine ORM: How to register multiple times in the same table using beginTransaction ()

How do I register to the same database table using beginTransaction (). Example: Registering various details of a product $entityManager->getConnection()->beginTransaction(); try { ... // ultimo id Produto cadastrado...
asked by 06.01.2015 / 14:33