l3pp4rd/DoctrineExtensions — Issue #238: Defaultable extension
Author: yosmanyga
Created: 2012-01-22 20:04:15+00:00
State: open

Hi guys,

What do you think about create a "Default" extension (or Defaultable?)

Defaultable will maintain a field for set if the entity is the default or not.

Also it can have a DefaultableGroup, similar to SortableGroup. Each group can have a default entity.

The first entity saved in the group will be the default.

If the default entity is deleted, another one of the same group is set as default.

The repository can have this methods: changeDefault, findDefault, etc

I have this behavior in many of my applications, what about you?

Regards.