Pregunta

I use inheritence between classes like this:

Vehicle---Car----SportCar

Vehicle---Truck---TruckMachine

my class Vehicle has entity annotation and bidirectional relationship (manytomany) .

For Car and Truck, my slug is not the same and is generated using different fields of each class.

my classes:

https://github.com/VasMozart/DoctrineExtensions/tree/master/tests/Gedmo/Sluggable/Fixture/Inheritance2

and my test https://github.com/VasMozart/DoctrineExtensions/blob/master/tests/Gedmo/Sluggable/Inheritance2Test.php

if i instanciate "Car" my slug work but if i instanciate "SportCar" i get: "Integrity constraint violation: column slug is not unique"

thx and sorry for my english

¿Fue útil?

Solución

it was an issue (when persisting slugs the class name differs)

https://github.com/l3pp4rd/DoctrineExtensions/issues/667

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top