Questions tagged as 'doctrine'

0
answers

Triger after update as a solution to debit credit securely

I need to make an interface that guarantees the integrity of the customer's credit. In PHP, when we use LOCK explicitly in the PDO, with LOCK TABLES, if there is an inconsistency, when the same client object is in several processes relating even...
asked by 21.02.2017 / 20:18
0
answers

nested entities / list nested in Doctrine

I have two Plates and Candidate tables with the same structure: TABLE Chapa ( id INT AUTO_INCREMENT NOT NULL, PRIMARY KEY(id) ) TABLE Candidato ( id INT AUTO_INCREMENT NOT NULL, chapa_id INT DEFAULT NULL, PRIMARY KEY(id) )...
asked by 14.12.2016 / 20:40
0
answers

Specify table name using namespace in createQuery in Doctrine

I need to create a database query on a table whose name is order and can not be changed. I made the following query: $query = $entityManager->createQuery("SELECT sum(o.orderPrice) FROM \App\En...
asked by 23.10.2016 / 22:46
1
answer

Error changing table via Doctrine Migrations

Through git I used the command below: php bin/console doctrine:migrations:generate I opened the file and made the change <?php namespace Application\Migrations; use Doctrine\DBAL\Migrations\AbstractMigration; use Doctrine\DBAL\Schema...
asked by 15.07.2016 / 17:59
1
answer

PHP and Javascript - Tuning MySQL table lookup (Doctrine Query)

I'm doing on my page of my client, which I assumed from another developer, a section to search for events registered in the MySQL database. How is this page: <div id="detalhesBusca" class="textDescricaoSobre font13" style="display: none">...
asked by 08.06.2016 / 21:00
1
answer

Query with field of type json in Doctrine 2 and Symfony 3

Does anyone know a way to perform a query using Doctrine which has a JSON field? Postgresql query example: select id, nome, tipo, '{"idUsuario":465,"login":"paulo"}'::json from public.usuarios limit 5; I need to make this query in Doctri...
asked by 08.04.2016 / 21:43
1
answer

Serialize relationships Doctrine

How do I json the relationships of an entity in doctrine? I've looked around and made a few attempts but nothing that worked until now. I'm doing this and returns the normal json (without the relationships): $list = $this->getEm()->cr...
asked by 01.03.2016 / 23:01
1
answer

How to insert an object in doctrine, without persisting in other tables?

I am trying to insert a record into a table that contains compound key. This is the error:    "A new entity was found through the relationship   'EnFOperEstadoBean # grupoCompanica' that was not configured to cascade   persist operations for...
asked by 03.12.2015 / 18:15
1
answer

how to prevent sql injection symfony 1.4 and doctrine 1.2?

Hi, I have a 3 inputs of searches that make queries to the database and I get the data obtained. So a malicious user can circumvent my system and get other information. By analyzing the behavior I use for the user to interact with my syste...
asked by 19.11.2015 / 18:14
1
answer

Failed to execute git status when updating Doctrine

I'm servicing a system, and I need to upload some changes to the production server. Some of these changes involve mapping and adding new entities to the database. The problem: the ./vendor/bin/doctrine-module file is not on the server. Wha...
asked by 03.11.2015 / 19:33