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
2
votes
1 answer

Gedmo Tree Extension: Unable to find ancestor/parent child relation

I'm trying to use tree extension of Gedmo with YAML format but when I try to update the schema it returns the following error: [Gedmo\Exception\InvalidMappingException] Unable to find ancestor/parent child relation through ancestor field - [parent]…
user2359967
2
votes
1 answer

DoctrineExtensions - How to translate a slug?

I've been working the past 2 hours on translating my slug without much success. First, let's take a look at my entity : /** * BlogPost * * @ORM\Entity */ class BlogPost implements Translatable { /** * @var integer * *…
Michael Villeneuve
  • 3,933
  • 4
  • 26
  • 40
2
votes
1 answer

Symfony2: problems rendering the translation-form with A2lixTranslationFormBundle and Gedmo\DoctrineExtensions Translatable

I'm using gedmo/doctrine-translations and a2lix/translation-form-bundle: 2.*@dev to translate my entities. The translation form always renders a Field and Content but my entity itself doesn't contain a Field or Content field. The form…
Mauro
  • 1,447
  • 1
  • 26
  • 46
2
votes
1 answer

doctrine-extensions Uploadable, how to use in Zend Framework 2?

I integrated doctrine-extensions in my project. Timestampable is working as example. But how to use the "Uploadable"-behavior? I read this doc. They're writing in the usage-part about using $listener, but how do i get this variable? in my Controller…
2
votes
3 answers

sharing objects between doctrine2 odm and orm in symfony2 with doctrine extensions

in my project i need to share objects between orm and odm. I have an entity "Variation" and a document "Tracking". One variation can hold many trackingevents. I tried to solve it through doctrine extension references using the…
2
votes
2 answers

Override a property and make it Translatable in Doctrine Translatable / Symfony2

I have a mapped-superclass with a string property 'name' which belongs to a bundle (SyliusAssortmentBundle, actually). I have a class in my bundles that inherits from that mapped-superclass. I'd like to add Translatable capabilities to my entity by…
javigzz
  • 942
  • 2
  • 11
  • 20
1
vote
0 answers

How to order entities by case-insensitive string using API Platform?

I am using API Platform 3.0. In my application, I have an entity that includes a 'title' field. I'm looking to sort the entities by this 'title' field in a case-insensitive manner. I currently have the following annotation in my…
DurandA
  • 1,095
  • 1
  • 17
  • 35
1
vote
1 answer

Use Extension to filter OneToMany relationship

I'm using API Platform 3 and Gedmo's Softdeleteable Extension. For my entities, I'm using Extensions to add $queryBuilder->andWhere('o.deletedAt IS NULL') to all queries. This is working fine, but when using OneToMany relations, API Platform doesn't…
Stephan Vierkant
  • 9,674
  • 8
  • 61
  • 97
1
vote
0 answers

How to automatically add a property on every Entities

It's been days that I'm trying to achieve the following : Add a deletedAt property on every entities by default without having to use a trait, or adding inheritance (or mapped superclasses) to all of my already created entities. The goal here is to…
1
vote
2 answers

ApiPaltform - recover soft deleted element

I'm using ApiPlatform and Symfony5 I've implemented softdelete on an entity User This entity is softdeleted properly, I still want to displayed the deleted users for some roles, so I'm trying a DoctrineExtension to modify the request…
1
vote
0 answers

Doctrine DateInterval in QueryBuilder

Doctrine 2 supports FieldType "interval" and it is stored in DB as varchar "+P00Y00M168DT00H00M00S" For Entity's this is enough to add this to an DateTime-Object. But i wonder why this can't used in QueryBuilder. Should i create a Custom…
Marcus Wolf
  • 235
  • 1
  • 3
  • 12
1
vote
1 answer

Symfony DI: access config params on compiler pass during bundle build

Is it possible to get config parameters during compiler pass? I have this extention config: my_extension: foo: 'bar' I need to see if a config is set before adding a compiler pass:
numediaweb
  • 16,362
  • 12
  • 74
  • 110
1
vote
0 answers

Symfony 3.4 - updating entity after soft-deleting related entity row

I've got an entity called Logs that has a ManyToOne relation to an HourlyRates entity. Both Logs and HourlyRates have date properties. When adding a log with a specific date, an hourlyRate is assigned to it if the log-date fits within the rate's…
ephemerev
  • 31
  • 2
1
vote
2 answers

how to use utc timestamp symfony 4?

How to use utc_timestamp in Symfony 4? Getting below message while using utc_timestamp [Semantical Error] line 0, col 199 near 'UTC_TIMESTAMP': Error: 'UTC_TIMESTAMP' is not defined.
1
vote
0 answers

How to configure Gedmo Sluggable in Symfony 4 properly?

I have tried to configure Gedmo Sluggable properly in a Symfony 4 application and failed. The issue is: it is not working. Any sluggable columns aren't recognized as being sluggable and stay empty after…
itinance
  • 11,711
  • 7
  • 58
  • 98