문제

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

도움이 되었습니까?

해결책

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

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top