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
17
votes
2 answers

Fast entity Doctrine hydrator

I'm looking at improving the speed of doctrine hydration. I've previously been using HYDRATE_OBJECT but can see that in many instances, that can be quite heavy to work with. I'm aware that the fastest option available is HYDRATE_ARRAY but then I…
Rob Forrest
  • 7,329
  • 7
  • 52
  • 69
15
votes
4 answers

Gedmo Doctrine Extensions - Sluggable + Translatable Yaml Configuration

I'm trying to translate entities with gedmo doctrine extensions. https://github.com/Atlantic18/DoctrineExtensions I'm using yml as orm mapping file (auto generating entities). orm.yml: CS\ContentBundle\Entity\Post: type: entity table: posts …
Canser Yanbakan
  • 3,780
  • 3
  • 39
  • 65
12
votes
3 answers

Doctrine Extensions Sortable not working correctly when changing position by more than 1

Im using Symfony 3.1 + Doctrine GEDMO extensions (via StofDoctrineExtensionsBundle). I've set my entity to have Sortable behavior:
OKE
  • 364
  • 1
  • 5
  • 13
11
votes
1 answer

How to log an entity that has collections?

I want to log all changes of an entity. I looked into Loggable doctrine extension as provided by the StofDoctrineExtensionsBundle. I got it working for fields that store simple data, e.g. string and integers. But my entity also has ManyToMany…
10
votes
1 answer

Using Doctrine extension softdeleteable with api-platform

I'm building an API with Symfony 3.4 and api-platform. I want to use soft delete on my entity. I've installed DoctrineExtensions and StofDoctrineExtensionsBundle. config.yml: doctrine: dbal: connections: default: …
Hakim
  • 1,084
  • 11
  • 28
9
votes
3 answers

Gedmo\Loggable logs data that doesn't have changed

I'm using Symfony2.2 with StofDoctrineExtensionsBundle (and so Gedmo DoctrineExtensions). I've a simple entity /** * @ORM\Entity * @Gedmo\Loggable * @ORM\Table(name="person") */ class Person { /** * @ORM\Id *…
6
votes
1 answer

Custom JSON serializers for a Symfony 3 entity

I have a Symfony 3.2 entity using Doctrine's Translatable extension. namespace AppBundle\Entity; use Doctrine\ORM\Mapping as ORM; use Gedmo\Mapping\Annotation as Gedmo; use Symfony\Component\Serializer\Annotation\Groups; /** * Media * *…
Damien Debin
  • 2,812
  • 25
  • 41
6
votes
2 answers

gedmo/doctrine-extensions asking for a token when installing via composer

Is anyone else having an issue gedmo/doctrine-extensions installing via composer? The repository is public so I am not sure why it's saying it is a private repo Cloning failed using an ssh key for authentication, enter your GitHub credentials to…
user742736
  • 2,629
  • 5
  • 30
  • 40
5
votes
2 answers

Doctrine 2 nested set - retrieve full tree in single query

I'm using stof/StofDoctrineExtensionsBundle (Bundle wrapper for Atlantic18/DoctrineExtensions) to implement a Nested Set (tree) entity. The entity is configured and working, but I can't figure out how to retrieve all root notes with all of their…
5
votes
1 answer

Symfony2: how to validate UploadedFile without form?

I need to upload download file from URL to my server and persist it with Uploadable (DoctrineExtensions). Almost everything works fine, my approach is: Download file with curl to temp folder on my server Create UploadedFile method and fill it with…
5
votes
0 answers

Zend Framework 2 + Doctrine Extensions Taggable

I am trying to integrate DoctrineExtension-Taggable into Zend Framework 2. First I added to composer: "anh/doctrine-extensions-taggable": "1.1.*@dev" Then built instances via service manager (in module.config.php): 'service_manager' => array( …
5
votes
1 answer

i18n Form translations with knp Doctrine extension

I'm using "knp Doctrine Translatable" to translate Entities. So far is working great. Now I come to a point where I would like to have a generic solution, that works for any amount of languages. So I though about using an embeded form (Collections)…
Martin Fasani
  • 825
  • 7
  • 20
5
votes
1 answer

Overwrite serializer metadata for DoctrineExtensions Taggable

Can I overwrite the way the tag object gets serialized? Currently everything is returned, I'd like to exclude the id, created_at, updated_at and tagging. Im using the JMS Serializer bundle, Doctrine Extensions Taggable with FPN Tag Bundle. This…
shapeshifter
  • 2,967
  • 2
  • 25
  • 39
5
votes
3 answers

Unable to run two migration execute commands together within a single console command

For development we have a single Symfony console command that executes other console commands in order to rebuild db, run fixtures etc. As part of the process I need to run a few cherry-picked doctrine migration commands, but for some reason I'm…
MadManMonty
  • 816
  • 1
  • 7
  • 25
5
votes
2 answers

Ordering entities with sortable behavior in Doctrine 2 (Symfony 2)

I've created an entity that has a Sortable behavior and have one question about using it. The methods for setting and getting positions are not enough for me, so I want to do simple moveUp and moveDown methods with following code: public function…
TrueDrago
  • 81
  • 1
  • 3
1
2 3
11 12