Most voted "doctrine" questions
Doctrine is an Object-Relational Mapping (or ORM) framework for PHP. The ORM is a development technique used to reduce the impedance of object-oriented programming using relational databases. The database tables are represented through classes and the records of each table are represented as instances of the corresponding classes.
Learn more…95 questions
Sort by count of
-
8
votes1
answer2008
viewsInstall Codeigniter 3 with Doctrine and Composer
What is the best way to install Doctrine via commiserate in the codeigniter 3.0? I plan to leave the files in the folder libraries. I created the file composer.json: { "config": { "vendor-dir":…
-
6
votes2
answers765
viewsHow to configure the Doctrine terminal together with a Codeigniter project?
I’m doing the integration of Doctrine in Codeigniter but I’m having problems configuring the line. First of all it is important to mention that I followed the guide available on the Doctrine…
-
5
votes2
answers326
viewsUse of uncharted entities in Symfony2
I read that normally the Entity folder of a Bundle stores the entities that will be persisted (in my case, by Doctrine) in the database. But, due to the ease of working with validations in the…
-
5
votes2
answers2069
viewsDoctrine: Manytomany’s Relationship with Extra Fields
I have a many to many relationship between two tables: Products and Orders. The Doctrine then generates a third table. So far quiet. But wanted to generate in this third table more fields (Qtde and…
-
4
votes1
answer460
viewsRelationship between 3 entities
I have the following tables: +----------+ +----------------------+ +------------+ | Produtos | | ProdutosVsCategorias | | Categorias | +----------+ +----------------------+ +------------+ - ID - ID…
-
4
votes2
answers792
viewsPDO vs Doctrine
Work with systems development in PHP, more focused on e-commerce. Currently I use the PDO to make my connection to a database, but out of curiosity I decided to search about the Doctrine, because…
-
4
votes2
answers145
viewsLeaking memory in PHP
Leaking memory or Leaky memory occurs when a computer program does bad memory allocation management such that memory that is no longer needed is not released. I’d like to understand how the Leaking…
-
3
votes1
answer786
viewsfindBy Doctrine
I would like to ask a question, I am using the command to make a filter: $FinContaspagar = $em->getRepository(FinContaspagar::class)->findBy(array('grupo' => '0')); However, I would like…
-
3
votes2
answers184
viewsDo data received via Request using Doctrine need to be processed?
I’m developing a new project, it’s the first time I’m using Doctrine with Silex and I am in doubt as to the receipt of information through forms. I receive the data from forms through the Request of…
-
2
votes1
answer118
viewsDoctrine 2 - Entities in more than one directory
Good morning guys, I’m starting in Doctrine 2.4 and I’m developing a system where I separate files from the file core of the application, as follows: /root |-- /src |-- /App |-- /Model |--…
-
2
votes1
answer861
viewsDoctrine 2 - Does not recognize class mapped with $entityManager->getRepository()
Personal iae... In my file bootstrap.php I am trying to take the repository of a certain entity and gives Fatal Error, informing that the Class does not exist, but it does exist. Here is the error…
-
2
votes1
answer71
viewsDoctrine2 using namespace error Composer
Hello I am creating a file that serves as base class in Basetable.php Entities as follows: <?php namespace Entidades; use Doctrine\Common\Collections\ArrayCollection; /** * @MappedSuperclass */…
-
2
votes1
answer49
viewsPersistence with Doctrine does not take Object data to Insert
I started a new PHP project where every database has tables and their columns with different class names and attributes. With the intention of winning in the productivity of not being renamed I…
-
2
votes2
answers343
viewsHow to use store with Doctrine
How to use stored Procedure with Doctrine ? Should I use createNativeQuery ?
-
2
votes1
answer69
viewsReturn property in a Manytomany relationship
I have a relationship ManyToMany between 2 classes. Campannha and Empresa. A Annotation of the class Campanha is like this: /** * @ORM\ManyToMany( targetEntity="JN\Entity\Empresas\Empresa") *…
-
2
votes1
answer159
viewsHow to import CSV into Symfony2
I am trying to create a generic way to import CSV the $data represents a full line of csv data. I am trying to generate a answer to register the data using the form public function…
-
2
votes0
answers90
viewsImplementation of Doctrine 2.5 in Laravel 5.1 using mysql database configuration
I started using the Larable recently and managed to configure almost everything, but when configuring the database, soon after the installation of Doctrine, it returns me this error:…
-
2
votes1
answer45
viewsHow to use Paramconverter inside the controller or in service
The Paramconverter is a note that I use constantly in Symfony to recover the data sent already in object, so parse is made automatic, in my case, simply add comment in the method of the respective…
-
2
votes1
answer159
viewsLegacy PHP and Doctrine: Duplicate Definition of column
Good afternoon. The following error is happening: Error: Duplicate Definition of column 'numg_usuario' on Entity 'Usuario' in a field or discriminator column Mapping. My User class extends from…
-
2
votes1
answer138
viewsView Datetime Content using Doctrine
In a Webservice project using Slimframework, I decided to add Doctrine to the BD queries. I decided to follow the guidance of DOCTRINE to work with Datetime and Time Zones according to this site…
-
2
votes1
answer656
viewsDoctrine 2 INNER JOIN with Subquery
I’m migrating my appointments to Doctrine using the Querybuilder. And I have a consultation with Inner Join with a subquery, would like to know how to do this using Doctrine. SELECT p.* FROM…
-
1
votes1
answer108
viewsBlameable behavior does not work on Symfony2
I am implementing in Symfony2 the behavior Blameable using the Gedmo\Mapping\Annotation. I have successfully implemented the Timestampable, but I cannot implement the Blameable. The problem is that…
-
1
votes1
answer307
viewsDoctrine - Access the $entityManager variable created in bootstrap.php from within a Class
I am studying Doctrine and am adapting a project I had already developed in MVC to work with Doctrine. I am having a certain doubt on how to proceed in relation to the variable $entityManager that I…
-
1
votes1
answer805
viewsModel layer with DAO classes
Work with an MVC application that can be considered large or at least average, as it involves hundreds of features and more than 400 Mysql database tables. As a ORM tool we adopted Doctrine through…
-
1
votes2
answers198
viewsSemantical Error - Doctrine createQueryBuilder
But once I get caught using Doctrine. I wanted to do it: SELECT c.nm_computador, c.te_ip_computador, log.usuario, log.data FROM computador c INNER JOIN log_user_logado log ON c.id_computador =…
-
1
votes1
answer104
viewsDoubt about how to share information
Create a static control for the menus, the goal was for each Bundle to register its menu item. <?php namespace Test\RegisterBundle\Controller; use…
-
1
votes1
answer443
viewsFilter tables to be mapped by Doctrine from Entitymanager (no command line)
I’m developing a feature in my application that consists of automatically mapping and generating entities. The problem is that the user can select the tables he wants to map, so I must insert a…
-
1
votes1
answer100
viewsDoctrine DQL with WHERE does not work
Good afternoon! I’m trying to perform a query in a table of users that has FK of 4 other tables, but I believe that is not the case, and perform 2 filters in WHERE, for example WHERE login =…
-
1
votes1
answer509
viewsHow to fetch data from another entity using Doctrine 2
I have two entities a Product (id, id_category, name) and another Category (id, name), in the product entity I want to bring the category name by the product table id_category. There is a way to do…
-
1
votes1
answer777
viewsDoctrine - One-To-Many Relationship
Good afternoon! I’m in a relationship with Doctrine and I have a question. I have 2 tables in my database, the Log table and the Log details, where 1 log can contain multiple records referenced to…
-
1
votes2
answers217
viewspreg_match('/ d*$/', $nr_procedure) ? 'f' : ’t'; - what do ? php
I have it (preg_match('/^\d*$/', $nr_procedimento) ? 'f' : 't';) in a code, but I have no idea what it does, more precisely the part of preg_match('/^\d*$/'. Does anyone know?…
-
1
votes1
answer54
viewsHow to access the Sqls of the updates made by Doctrine Orm:schema?
I have an application running on a server (production) that does not give access to ../vendor/bin/doctrine and so I can’t run the commands, like the orm:schema-tool:update, for example. I am running…
-
1
votes1
answer133
viewsDoctrine DBAL bank operations DB
To make bank operations and better use(or which to use): Data manipulation Query-Builder To work with data manipulation ? and how I would do to make bank operations will go with it for example:…
-
1
votes1
answer198
viewsDoubt about the Doctrine dbal project structure
I read the Documentation the only thing I didn’t understand was what his structure is like. Explain: My file composer.json at the root of the project { "require": { "doctrine/dbal": "2.4.*" } } When…
-
1
votes0
answers371
viewsHow do I use Doctrine’s Entity Generator?
I’m trying to use Doctrine on a project. however I am having difficulty in being able to use Entity Generator once the database is ready and would like Doctrine to create the entities from it.…
-
1
votes1
answer275
viewsORM Mapping error in Doctrine 2
I’m mapping the database with Doctrine and I’m having a problem. When I use the Annotations as follows it works perfectly: /** * @Entity *…
-
1
votes2
answers255
viewsSelect repository-specific columns in Doctrine 2
First, we know that depending on the number of columns in a query, you can increase the response time. In Doctrine I call the following repository, which has a relationship and brings all the…
-
1
votes0
answers155
viewsRun an execution block (SQL Server) on Doctrine + ZF2
I need to run an SQL (SQL SERVER) execution block on a Repository in Doctrine. My environment is with ZF2 + Doctrine 2. I’ve read some things about ResultSetMappingin Doctrine, but I couldn’t. Code:…
-
1
votes1
answer206
viewsHow to check if a table date is lower than today in Doctrine - Postgresql
I have to check if the user has registered an expiration date, if yes, I check if that date is lower than today if it is, it shows if it does not hide, I did so: $this->noticia =…
-
1
votes1
answer270
viewsSelf relationship Doctrine
I’m using Doctrine, and now I have the following problem. I am making a register of menus system, where the same can have several "children" and their "children" can also have "children", and so on.…
-
1
votes2
answers93
viewsInsert null into a Doctrine relationship
I have a table of votes and a table of users, where for each vote entered the user can or can not be identified (relationship one-to-Many). In case the user does not identify, how do I insert NULL…
-
1
votes0
answers38
viewsThe "Types" model has no "Situation" relation
Opa, I’m trying to make a relationship between two tables but is returning me this error, above. I have no idea what is wrong. this is my YAML structure: Tipos_denuncias: connection: doctrine…
-
1
votes0
answers39
viewsDoctrine Loader Entity
By uploading the project Doctrine cannot load the files from the Entity folder. bootstrap.php use Doctrine\ORM\Tools\Setup; use Doctrine\ORM\EntityManager; require_once…
doctrineasked 9 years, 6 months ago Israel Zebulon 1,758 -
1
votes1
answer97
viewsCriteria query with contains expression in the Manytoone entity field
Considering the two entities below: /** * @ORM\Table(name="cliente") * @ORM\Entity */ class Cliente { /** * @ORM\Column(name="id_cliente", type="integer") * @ORM\Id *…
-
1
votes1
answer255
viewsSelect 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 Albums for the user to view. I want to make a distinct of…
-
1
votes0
answers1487
viewsPDO - Uncaught Exception 'Pdoexception' with message 'could not find driver'
Look at us! I am trying to set up a project in a Mac Yosemite environment. The project I intend to run works normally on an Ubuntu. I did the installation of the PDO drive. phpinfo is like this: PDO…
-
1
votes1
answer148
viewsHow to insert an object in Doctrine without persisting in other tables?
I’m trying to insert a record into a table that contains composite key. That is the mistake: "A new Entity was found through the Relationship 'Enfoperestadobean#grupoEmpresa' that was not configured…
-
1
votes1
answer290
viewsUse like in the findby method to filter records?
I have the following code in my controller: $shares = $this ->getDoctrine() ->getRepository('AppBundle:Shares') ->findBy( $where, $orderBy, $paginator->getPerPage(),…
-
1
votes0
answers37
viewsUPDATE NO DOCTRINE-MODULE
To generate the database map I use this code: doctrine-module orm:convert:mapping --force --from-database --namespace="Application\Entity\\" annotation C:\www\projetoBd\module\Application\src To…
-
1
votes1
answer39
viewsDate with zero Doctrine value
Good afternoon, I’m using the Doctrine In my project to control the bank. I am trying to enter a date but it does not return any value. If I use the $_POST I can see the value. Save function: public…