Questions tagged as 'doctrine'

1
answer

Print an array with multiple data from a select, once

I have an array that receives precisely 18 values. Each "key" of this array is a time and each value of this is an SQL query. I pass this array to a json file to bring the data objects I need. The problem is that this array prints severa...
asked by 15.06.2015 / 15:39
1
answer

How to use DataFixtureLoader

I'm relying on this tutorial , but I have the Country and State classes. I'm trying to import the data using the command: php console doctrine:fixtures:load When I run it works for CountryLoader , it loads the data and stores it in the da...
asked by 07.04.2015 / 19:00
1
answer

Doctrine Insert in many-to-Many unidirectional relation

I have the following situation: In my Location entity: /** * @ORM\ManyToMany(targetEntity="Contato") * @ORM\JoinTable(name="contato_localidade", * joinColumns={@ORM\JoinColumn(name="localidade_id", referencedColumnName="identificad...
asked by 17.03.2015 / 15:14
1
answer

How to optimize memory consumption using Doctrine

I need to read and save in the database two files the first (smaller) has about 49,000 rows (each row will be make a record). I parse this file by instantiating the object and then saving that object to the database using Doctrine. I can save ab...
asked by 09.02.2015 / 18:59
1
answer

Error using doctrine installed via composer

I installed Doctrine via composer: { "require": { "doctrine/common": "2.4.*", "doctrine/dbal": "2.4.*", "doctrine/orm": "2.4.*", "phpunit/phpunit": "3.7.*" } } When running unit tests, the location of the Arra...
asked by 11.04.2015 / 02:49
3
answers

How to capture the result of a doctrine2 execution?

I am implementing doctrine in a project, however I have a question about inserting, updating and removing data. When I execute the following command for example: $companyName = $entityManager->getRepository("Admin\Module\Configuration\Entit...
asked by 16.12.2014 / 12:51
1
answer

Problems persisting data in Doctrine

I'm doing this: function Autenticar($objecto) { //require $this->db; require ROOT . "config/bootstrap.php"; return $entityManager->getRepository('models\Usuarios')->findOneBy(array('login' => $objecto-&...
asked by 30.09.2014 / 20:21
1
answer

Doctrine findAll method returns the same id on all lines

I'm doing a search that returns all my Entity data. It happens that it returns me all the data but with the same id, but I checked the database the ids are different. . $entityManager->clear(); print_r($entityManager->getRepo...
asked by 03.10.2014 / 16:40
1
answer

Doctrine DBAL database DB operations

To make bank operations better and to use (or which to use): Data Manipulation Query-builder To work with data manipulation? And how would I do it to do bank operations with him for example: #inserção no banco $sql = INSERT INTO t...
asked by 03.09.2014 / 18:53
1
answer

DQL Doctrine with WHERE does not work

Good afternoon! I'm trying to perform a query on a user table that has FK from 4 other tables, but I guess that's not the case, and I make 2 filters in WHERE, for example WHERE login = 'string' AND id <> numero; . But it does not...
asked by 24.07.2014 / 21:54