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
1
vote
1 answer

How to get DoctrineExtensions sluggable working with doctrine 2.3 / symfony 3.4?

I try to get sluggable doctrine extention working on my project. I follow a setup step found on Internet, bu it seems to not working (@Gedmo\Slug seems to be not called/triggered). The purpuse is to slug a post title. I'm using Symfony 3.4 and…
benjy80
  • 179
  • 1
  • 11
1
vote
1 answer

Doctrine Translatable: How to return default value of field if translatable field is not exist

I use Doctrine Translatable for tranlate of my some entity. For example: I have entity "Category" and this entity has one translatable field - "name": /** * @ORM\Entity(repositoryClass="AppBundle\Repository\CategoryRepository") *…
1
vote
2 answers

API Platform - Entity Translation, Doctrine Translatable

I'm trying to add KnpLabs Doctrine Behaviors - and precisely, the Translatable Behavior - on one of the entity in my API Platform project. Here's what I've done so far : namespace App\Entity; use Doctrine\ORM\Mapping as ORM; use…
skytorner
  • 405
  • 2
  • 8
  • 19
1
vote
1 answer

Generating Softdeleteable query with StofDoctrineExtensionsBundle

I'm expecting, it should update deleted_at field when I've executed DELETE query. And it should add deleted_at is null condition to end of SELECT query. But its really delete rows with a silly condition. What is wrong? $query =…
levye
  • 532
  • 6
  • 20
1
vote
1 answer

Cloning Doctrine entity with translations made with DoctrineExtensions Translatable

I have entities with traslated fields using Translatable from DoctrineExtensions. This is how it looks: /** * @ORM\Table * @ORM\Entity(repositoryClass="AppBundle\Entity\Repository\SurveyAnswerRepository") * @Gedmo\Loggable */ class…
Marek
  • 2,681
  • 3
  • 22
  • 18
1
vote
0 answers

Gedmo Translatable yaml mapping

Is it possible to map Gedmo with yaml ? I'm using yaml file in my project and I would like to use Translatable from doctrine extensions but I have a problem with it. I have something like that (one entity / one translation table) : class…
Joe Allen
  • 1,267
  • 4
  • 24
  • 41
1
vote
1 answer

stof_doctrine_extensions can't load in symfony

I'm trying to do a "soft-delete" for a symfony project. So i want to use StofDoctrineExtensionsBundle and i did : stof_doctrine_extensions: orm: default: ... softdeleteable: true doctrine: ... orm: …
Sylvain Attoumani
  • 1,213
  • 1
  • 15
  • 34
1
vote
1 answer

Symfony Doctrine Extensions not showing parent child list

I'm having issue with parent-child list view in symfony gedmo doctrine extensions. My list is showing everything in the same level and I don't know how to fix it. I've tried to use datagridvalues to sort by lftfield but it is not working. My…
woj_jas
  • 1,092
  • 7
  • 23
  • 50
1
vote
1 answer

Get parent_id of Gedmo Tree element using symfony3, doctrine2 and stofDoctrineExtensionsBundle

Introduction I am using Symfony v3.1.6, Doctrine v2.5.4 and StofDoctrineExtensionsBundle [1] in order to manage Tree structure. To setup Tree structure I used documentation on Symfony.com [2] followed by documentation on GitHub [3]. Then I proceeded…
1
vote
2 answers

Doctrine Translatable not showing translated text on locale change

I am using translatable with doctrine in a Symfony project. I've been able to add the translatable entity and store translated texts but when I change the locale in the website the texts are not shown although if I iterate over the translations i…
David Rojo
  • 2,337
  • 1
  • 22
  • 44
1
vote
1 answer

Doctrine sortable extension in symfony3 - Error: Not Null

I try to use the doctrine extension sortable via the gedmo extension. I installed the gedmo-package with composer and followed the instructions of the installation in symfony2. I use yaml-files as mapping-information for doctrine. My yaml-file:…
Nico227
  • 326
  • 2
  • 9
1
vote
2 answers

symfony3 doctrine2 association counter field

Consider the following case: I have two entities: Article and ArticleComment: // \AppBundle\Entity\Article /** * @ORM\OneToMany(targetEntity="ArticleComment", mappedBy="article") */ private $comments; I need to store the amount of comments in a…
Xymanek
  • 1,357
  • 14
  • 25
1
vote
0 answers

Symfony Circular Reference Exception with Doctrine tree extension

I have a Circular Reference Exception because of Doctrine Tree Extension when I'm tring to load my fixture with Alice fixture. [Doctrine\Common\DataFixtures\Exception\CircularReferenceException] Graph contains cyclic dependency. An example of…
Kevin
  • 4,823
  • 6
  • 36
  • 70
1
vote
1 answer

Doctrine Timestampable on custom field type in Symfony2

In a Symfony2 project, I am using a custom Doctrine type 'unixtime' to map date fields stored as unix timestamps in a legacy database: /** * @var \DateTime * @ORM\Column(name="created", type="unixtime", nullable=false) */ private $created; Now…
cg.
  • 3,648
  • 2
  • 26
  • 30
1
vote
1 answer

Why is DoctrineExtensions Blameable eagerly fetching all created_by users

When using the following trait in my user class /** * @var User * * @Gedmo\Blameable(on="create") * @ORM\ManyToOne(targetEntity="User") */ protected $createdBy; /** * @var User * * @Gedmo\Blameable(on="update") *…