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
3
votes
3 answers

Use loggable to refer to a version of Product in Order Line?

I would like to track changes of different entities and refer to a specific version from other tables. For example: in the Orderline table, I would like to refer to a specific version of a product. Is the Loggable extension the best way to implement…
3
votes
0 answers

How to use Sluggable with a custom mapping type?

In a Symfony2 project, I created a custom mapping field in order to encrypt strings in the database as suggested in this StackOverflow question. I want to slugify one of the database fields using the Gedmo\Sluggable Doctrine extension. But obviously…
Gianluca78
  • 794
  • 1
  • 9
  • 24
3
votes
2 answers

DoctrineExtensions (l3pp4rd) or EntityAudit (simplethings)

I need to implement Versionable Doctrine behavior on a Symfony 2 application. It is really a Symfony 1 migration with Versionable behavior (Doctrine 1) already implemented. I have found this two solution out there DoctrineExtensions -…
3
votes
1 answer

gedmo doctrine translatable extension. Retrieve all translations or a specific one (different from the current locale)

I've an entity that uses gedmo doctrine translatable extension. I'm able to load this entity in the current locale. Now, for an admin panel where I want users to see and edit the various translations, I want to show all the translations or a…
dop3
  • 391
  • 1
  • 14
3
votes
3 answers

DoctrineExtensions(Beberlei) does not work - Doctrine 2

I installed the Beberlei DoctrineExtensions but can't get the mysql DAY and YEAR to work. I have this in my autoloader: $doctrineExtensions = new Doctrine\Common\ClassLoader('DoctrineExtensions',…
Saggo
  • 129
  • 1
  • 4
  • 13
2
votes
1 answer

How to get some child nodes by id with all parents (DoctrineExtensions, Gedmo-Tree NestedTreeRepository, Symfony)

Goal: I have a category entity. Every category can have subcategories. Now I want to get specific category nodes by id with all its parents My current solution (custom repository function): public function…
2
votes
1 answer

when I try to write a dql query there is an error for lag & over ( beberlei/DoctrineExtensions )

I'm trying to convert a MySQL8 query to Doctrine DQL in Symfony4. I used to https://github.com/beberlei/DoctrineExtensions extensions. But there are still errors. Query is work well. SELECT id, machine_amount, LAG(machine_amount) OVER ( PARTITION…
Mehmet S.
  • 394
  • 3
  • 18
2
votes
1 answer

How can I get Gedmo\Timestampable to keep updated_at null on first create?

I've got a Symfony 2.8 app which uses The Gedmo\Timestampable annotations for automatic created_at and updated_at operations, but it seems to be putting the same timestamp into the updated_at column when the entity/row is first created. An UPDATE…
aalaap
  • 4,145
  • 5
  • 52
  • 59
2
votes
0 answers

Doctrine 2 left join with in a tree

I have two entities: People and Document A people can have n childrens: /** * * @ORM\ManyToOne(targetEntity="People") * @ORM\JoinColumns({ * @ORM\JoinColumn(name="dad_id", referencedColumnName="id") * }) */ private $dad; /** * *…
Ciro Vargas
  • 422
  • 1
  • 5
  • 16
2
votes
0 answers

Multiple RelativeSlugHandler

I want to do something like that: /** * @Gedmo\Slug(handlers={ * @Gedmo\SlugHandler(class="Gedmo\Sluggable\Handler\RelativeSlugHandler", options={ * @Gedmo\SlugHandlerOption(name="relationField", value="product"), * …
MuriloKunze
  • 15,195
  • 17
  • 54
  • 82
2
votes
0 answers

Gedmo Doctrine Extensions and YML

I am trying to configure translatable extension in my own project. The problem is that I have a whole bundle configured using yaml for mapping entities, so each entity have its own .orm.yml file. Now, I am trying to add the translatable extension…
Gerardo
  • 5,800
  • 11
  • 66
  • 94
2
votes
2 answers

How to update left, right, level values on existing category hierarchy data using gedmo tree doctrine extension in symfony?

http://sqlfiddle.com/#!9/1d4a6/1 I have existing hierarchical data for categories. I have been using traditional approach to get parent, child etc using parent_id. Now I am trying to use Gedmo doctrine extension for the same. I have installed the…
vishal
  • 3,993
  • 14
  • 59
  • 102
2
votes
3 answers

How to disable Blameable-behaviour programmatically in Symfony2

I'm trying to run a console command in symfony2 in which some properties of a certain class are being updated. One of the properties has got a corresponding reviewedBy-property which is being set by the blameable-behaviour like so: /** * @var bool …
2
votes
0 answers

How to get translated associations (category names) of translated Product using Doctrine Translatable?

My default locale is pl_PL. When i switch to en_US the following code gives expected result: // locale set to en_US $product = $em->getRepository('model\Product')->find(1); $category = $em->getRepository('model\ProductCategory')->find(1); echo…
2
votes
2 answers

How to apply a Doctrine filter to a whole bundle in Symfony?

I would like to use the SoftDeleteable behavior extension for Doctrine2 in my Symfony2 application to hide deactivated users and entities related to them. This is great and simple solution for the frontend, but I would like to disable this filter…
Zsolt Rácz
  • 103
  • 1
  • 6
1 2
3
11 12