Questions tagged as 'doctrine'

1
answer

Count records in Doctrine

I need to return the total number of records in a field of a table, and also count the number of records of a given id. I need to count the data of a poll's table of votes so I need to count the values of a field to calculate the percentage....
asked by 28.09.2015 / 05:24
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
1
answer

Select Distinct in Doctrine and Symfony

Hi, I have a photo album creation table. My code makes 1 insert for each image added in the photo album. I have a grid for displaying the albums for the user to view. I want to make a distinct of duplicate albums. I have this type of code:...
asked by 10.09.2015 / 14:25
1
answer

Doubts Distinct with Doctrine_Query

I have a table in mysql and I need to return unique values from this table, but I am not able to create a function or query that suits. The SQL statement in the database would be like this and it works fine, but in Doctrine I can not do: SELEC...
asked by 18.09.2015 / 16:48
2
answers

current_date doctrine

Tchê, I'm just trying to get information from the bank only when I have the same day as today, so I tried these ways: ... ->where('a.data_hora = ?', current_date()); .... ->where('a.data_hora = current_date'); ..... $data = date...
asked by 03.06.2015 / 15:35
1
answer

Get form value

This is my twig form. <form id="csv" action="{{ path('faturamento_csv') }}" method="post"> {% for elm, value in filtroLocais %} <input type="hidden" name="{{ elm }}" value="{{ value }}"> {% endfor %} <b...
asked by 27.08.2014 / 17:04
0
answers

How do I use the doctrine's entity generator?

I'm trying to use doctrine in a project. but I'm having difficulty getting the entity generator once the database is ready and I would like the doctrine to create entities from it.    bootstrap.php <?php // o Autoload é responsável por...
asked by 01.12.2014 / 11:59
1
answer

Get data from a ManyToMany relationship with Doctrine2

I have the following N: N relationship between the teacher and class tables, where there is a third table teachers_turtle. I want to list all the classes that this teacher teaches ( that is related ), but when I return to the teacher's query,...
asked by 01.12.2014 / 20:46
1
answer

ZF2 + Doctrine: generate entities returns 'in metadata classes to process'

Good morning. In my project, I'm tending to create entities from the database (php5.4 + zf2 + doctrine). I ran the command below: bin/doctrine-module orm:convert-mapping --filter="Category" --from-database annotation --namespace="Cat...
asked by 21.08.2014 / 15:09
2
answers

Using InnerJoin with Limit

I have the A table with a OneToMany relation to the B table. The A table is small, has 10 records. The B table has N records for each record in the A table. From X to X minutes a script is executed th...
asked by 07.06.2016 / 13:43