DoctrineSluggableBundle icon indicating copy to clipboard operation
DoctrineSluggableBundle copied to clipboard

Should it generate a new slug every update to the slug fields?

Open cammanderson opened this issue 13 years ago • 1 comments

Whether the object is new or for update, the DoctrineSluggableBundle creates a new slug based on the fields. This could potentially break a link to the slug if one of those fields are updated in the future. Should this be intended behaviour? Maybe there needs to be some sort of way of having it configurable so that if it is new it generates, but if is an update maybe not? Maybe the client could configure a new slug? This could be completely handled at the Entity level I suppose?

cammanderson avatar Aug 08 '11 02:08 cammanderson

Hey Cam,

This should be only happening on the prePersist event, which is before it's committed for the first time only - so it wouldn't be called on later updates to the entity.... or am I wrong?

samjarrett avatar Aug 15 '11 21:08 samjarrett