Questions tagged [doctrine-extensions]

The extensions are adding functionalities to the facilities provided by Doctrine, a DB abstraction layer and Object Relational Mapper for PHP.

The extensions are adding functionalities to the facilities provided by Doctrine, a DB abstraction layer and Object Relational Mapper for PHP. Through the ORM facilities, it allows to have automatic operations taking place during certain events (updating database, etc...)

It is setup as a bundle for Symfony 2 and as a module for ZendFramework, at least.

177 questions
0
votes
1 answer

Sort Gedmo Tree by arbitrary field using symfony4, doctrine2 and stofDoctrineExtensionsBundle

Introduction For my personal project i am using: Windows 10 Pro XAMPP with PHP v7.2.14 Postgres v10.6 Symfony v4.2.4 Doctrine v2.6.3 StofDoctrineExtensionsBundle in order to manage Tree structure. Setting up I did setup the tree structure (that…
Rikijs
  • 728
  • 1
  • 12
  • 48
0
votes
1 answer

How to set an user value in BlameableListener in a Zend Expressive application context?

How can I set an user value on Gedmo\Blameable\BlameableListener in a Zend Expressive application? The event subscribers are successfully added to the EventManager (see configuration file). The TimestampableListener is working as…
arueckauer
  • 349
  • 5
  • 19
0
votes
3 answers

YEAR() and beberlei/DoctrineExtensions

I have to make requests with YEAR and I installed beberlei/DoctrineExtensions with doctrine command. I added the requested annotations doctrine: orm: auto_generate_proxy_classes: '%kernel.debug%' naming_strategy:…
delph49
  • 79
  • 1
  • 11
0
votes
1 answer

How to use sluggable handler, only if a slug is empty?

I use Symfony 3 framework and the sluggable doctrine extension. I need generate a slug with code like this:
0
votes
1 answer

Symfony Creof FUNCTION mydbname.distance doesn't exist

I'm trying to use the Creof bundle and its Distance function. When I execute the following code, I get the following exception: public function getMapDecorator(array $requestInformation, $type) : MapDecorator { $queryBuilder =…
Etienne Noël
  • 5,988
  • 6
  • 48
  • 75
0
votes
1 answer

Doctrine2 loading DoctrineExtensions

I want to use the DAY() and YEAR() functions in my Doctrine2 query builder. But somehow I keep on getting errors: Fatal error: Uncaught Doctrine\ORM\Query\QueryException: SELECT DAY(h.date) AS day FROM Entities\Hit h GROUP BY day in PHP…
Youri
  • 495
  • 1
  • 4
  • 18
0
votes
1 answer

How to use PostgreSQL COLLATE modifier in Doctrine

I use Doctrine and PostgreSQL database in my project and I would like to make it translatable. The problem is that I would like to sort some strings correctly related to the selected language customs. Eg. in Czech language there is the letter "CH"…
0
votes
2 answers

error on override akeneo entity

I try to override the category entity of an akeneo project. I follow the doc but always have an error i can't resolve. added this in config.yml - original: Pim\Bundle\CatalogBundle\Entity\Category override:…
t-n-y
  • 1,201
  • 2
  • 13
  • 27
0
votes
1 answer

Symfony + DoctrineFixtures could not find fixtures in directory

Im running my own project with Symfony 3.3.*, trying to install DoctrineFixturesBundle. This is my fixture loader. namespace AdminBundle\DataFixtures\ORM; use Doctrine\Common\DataFixtures\FixtureInterface; use…
oadamczyk
  • 1
  • 1
0
votes
1 answer

beberlei DoctrineExtensions in ZF2 working fine on Windows localhost but shows fatal error Linux production server

I want to use use Day, Week, Month and Year functions of DoctrineExtensions in ZF2 and am getting the below error message. The code works fine on my local machine running on Windows but the same code does not work on server running on Linux. Fatal…
0
votes
0 answers

Symfony Gedmo Translatable and YAML configuration for generating entities

is it possible to use in a Symfony project Gedmo Doctrine Extension Translatable with YAML configuration and to generate the entities with php bin/console doctrine:generate:entities ? I tried the StofDoctrineExtensionsBundle, I tried Gedmo on its…
0
votes
0 answers

Too many queries in Sonata Admin

I have two classes: class Employee { use Knp\DoctrineBehaviors\Model\Translatable\Translatable; //... /** * @ORM\ManyToOne(targetEntity="Employee", inversedBy="employeeSubs") * @ORM\JoinColumn(name="employee_id",…
yisidejug
  • 1
  • 1
0
votes
0 answers

Best solutions for tree in doctrine with extension

I am finding Best solutions for tree in doctrine with extension. I need tree: in one table with multiple roots add onne root item to another root item tree items need order (weight) also roots create list with one select and without recursion I…
user2219071
  • 113
  • 10
0
votes
0 answers

mysql Or doctrine 2 query [order by MAX]

can i do this in doctrine or mysql, NOte that created is a datetime field, and i don't want to do it by another field as i may need to do it by updated date that is also a datetime field $query = $querybuilder->select(array( 'obs.insStatus…
Waqar Haider
  • 929
  • 10
  • 33
0
votes
0 answers

Why Doctrine adds automatically foreign keys to query?

I have just spotted that even if I select partial with id and name fields, Doctrine automatically adds all foreign keys to selected fields. How to turn it off globally or per query? I saw it when I was looking for an answer like here: Why is…
Tom
  • 1,203
  • 3
  • 15
  • 35