I have a date field in Y-m-d H:i:s format. Now user can search by using date only. I have query like this: I have added following lines at my doctrine.yaml file. But I am getting following error: Answer While you could create your own extension to add the DATE function to Doctrine, or download something like beberlei/DoctrineExtensions to do it
Tag: doctrine-orm
Symfony – Doctrine filter date if end date is null
I have tricky one, I am trying for days to fix the issue. I have Reports and Subscriptions. I have specified one date for report.. (Report entity has reportDate filed) Idea is to return one result for that specific report day. Then in a query builder, I am triggering Subscriptions table that has startDate and endDate filed. Idea is to
How can I get access to related entities with Symfony doctrine?
I try to find all documents that are related to my product: public function findDocumentsRelatedToProduct($id) { return $this->createQueryBuilder(‘products’) ->…
Doctrine get Product with most sales
I have a Product Entity with many Orders as association. I want to build a repository method that brings the most sold products. Each order only have 1 product with 1 quantity so, quantity is …
Force doctrine datatype choice, from tinytext to varchar
I’ve describe my entity with short text properties with fixed length. When I use the command make:migration, it generates an SQL code with TINYTEXT datatype. In my case it will be more accurate to use VARCHAR, as my properties have short fixed length. I’ve search, but I find no satisfying solutions. I would like to indicate to Doctrine to use
@DoctrineORMMapping “Annotation was never imported”
so i’m new to Doctrine and PHP in general and i have a small issue that i don’t know how to fix… I need to create a PHP app (using Doctrine) and to make communication with the DB my predecessor used Doctrine ORM; so i tried to use one of his files as a templates to make my part of
Symfony : How to fetch all object data from entity related with oneToMany relationship
I have “Car” and “Booking” entities related with oneToMany relationship :
ManytoMany ArrrayCollection In forms Symfony
I’m working on a Symfony project where an I have two types of User Client and EmployeSpie, both have their own entity. When you create/edit a user you can link EmployeSpie to a CLient. That’s where is my problem, When I edit or create a user I can create a user but nothing is store inside my table which make
Entity not found with Symfony 5.1
I have an issue with an Entity. The goal is to display a Form which the user can use to change his personal information like the Email or password. I created a form for that, but when I created the /Edit Route I get the following error: “AppEntityUsers object not found by the @ParamConverter annotation.” Here’s my Controller: Here’s the
Doctrine query builder – where IN with non string column names can’t be generated
I can’t sleep because of this, I either must be missing something really obvious or it can’t be done like that. I have this Doctrine Query Builder thingy: $this->queryBuilder ->…