Questions tagged [stofdoctrineextensions]

81 questions
3
votes
1 answer

Too many db queries with DoctrineExtensions Translatable Symfony2

I just installed the Translatable DoctrineExtensions from the StofDoctrineExtensionsBundle. I have two entities "Space" and "Equipment" with many to one relation : /** * Space * @ORM\Table(name="space") *…
user4457363
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

Symfony 2.5 Translate an uploadable field

How can i make an entity field both "uploadable" and "translatable" at the same time using StofDoctrineExtensionsBundle? this is what i've tried to do in the entity: Product.php /** * Product * * @ORM\Table("product") *…
jury89
  • 302
  • 3
  • 16
3
votes
1 answer

a2lix_translation_form default locale overriden by stof_doctrine_extensions translatable?

I'm using a2lix_translation_form tabs in my form. It has the feature, that it allows you to edit several translations to one property in one form. I have it configured like this: a2lix_translation_form: locales: [sk, en, de] # [1] …
Andrej Sramko
  • 833
  • 7
  • 18
3
votes
1 answer

DoctrineExtension Sluggable doesn't work with id field

I am trying to setup Sluggable from StofDoctrineExtensionsBundle to generate slug based primary key id and name field /** * @var string * @Gedmo\Slug(fields={"id","name"}) * @ORM\Column(name="slug", type="string", length=255, unique=true) …
dextervip
  • 4,999
  • 16
  • 65
  • 93
2
votes
0 answers

Doctrine extension: generate slug before flushing to database

Using the StofDoctrineExtensionsBundle (for Symfony) I generate a slug for my entity Institution based on its attribute internationalName like this: Institution.php /** * @ORM\Column(type="string", length=100, unique=true) *…
Dirk J. Faber
  • 4,360
  • 5
  • 20
  • 58
2
votes
0 answers

Doctrine Loggable Integrity constraint violation: 1048 Column 'object_id' cannot be null while persisting new entity

Issue with doctrine gedmo loggable extension amd stof doctrine extension config/doctrine/Tag.orm.xml
Sumeet
  • 1,683
  • 20
  • 27
2
votes
2 answers

Is it possible to update a required dependency from another package in the composer lock file?

I'm currently using the stof/doctrine-extensions-bundle in one of my Symfony projects and this bundle requires gedmo/doctrine-extensions. The latest version in gedmo/doctrine-extensions is failing. But the solution is in one of the sibling branches…
2
votes
1 answer

Doctrine Extension Translatable doesn't retrieve translation

I use personal translation of StofDoctrineExtensionsBundle. I've configured my App but i can't retrieve the translated labels, i get always the default text. config.yml # Doctrine Configuration doctrine: orm: auto_generate_proxy_classes:…
Jack Skeletron
  • 1,351
  • 13
  • 37
2
votes
1 answer

Using stof DoctrineExtension and a2lix TranslationFormBundle with one ext_translations table?

I know from this thread a2lix TranslationFormBundle AND Gedmo Doctrine Extension Translatable with just one Translation table that it's not possible with Gedmo (to have online one ext_translations table). Maybe there is another option like using…
2
votes
1 answer

StofDoctrineExtensionsBundle Uploadable

I use the StofDoctrineExtensionsBundle Uploadable to upload a picture in User entity.
Yssn
  • 361
  • 1
  • 5
  • 15
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
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
0 answers

Test blameable behavior with user in Symfony2

I'm writing a test for my entity Post, where I'm using blameable behavior from StofDoctrineExtensionsBundle. But whatever I do, there is always an error: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'created_by' cannot…
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…