rvanlaak / SettingsBundle

Database centric Symfony2 configuration management bundle. Global and per-entity settings supported.
MIT License
113 stars 61 forks source link

Entity #97

Closed Paktusin closed 7 years ago

Paktusin commented 7 years ago

Hi. Its possible to save Entities in setting field ?

dmishh_settings:
    settings:
        project_filter:
            type: entity
            options: {class: AppBundle:Project, multiple: true, choice_label: name}

In this config it save, but then on form load (/settings/global) symfony throw error

Entities passed to the choice field must be managed. Maybe persist them in the entity manager?

Paktusin commented 7 years ago

Solved choice_value: id

dmishh_settings:
    settings:
        project_filter:
            type: entity
            options: {class: AppBundle:Project, multiple: true, choice_label: name, choice_value: id}