I have a problem with slugs in symfony. I defined the slug fields with the last_name and first_name fields but when I load the fixtures, the slug for each fixture is created based on the title field of the table and not based on my defined fields. do you know why this could happen?
Faculty:
tableName: faculty
inheritance:
extends: SvaGeneric
type: concrete
columns:
instructor_id: { type: string(20) }
first_name: { type: string(255), notnull: true }
last_name: { type: string(255), notnull: true }
title: { type: string(80) }
actAs:
Sluggable:
unique: true
fields: [last_name,first_name]
canUpdate: true
Make sure your definition looks like:
# config/doctrine/schema.yml
JobeetCategory:
actAs:
Timestampable: ~
Sluggable:
fields: [name]
columns:
first_name:
type: string(255)
notnull: true
last_name: {type: string(255), notnull:true }
So set the fields the right way:
Sluggable: { fields: [first_name,last_name], }
Maybe you check if you need "uniqueBy" or a custom behaviour for multi-column slugs.