diff --git a/templates/Dto/element/methods.twig b/templates/Dto/element/methods.twig index 72a5991..597bb22 100644 --- a/templates/Dto/element/methods.twig +++ b/templates/Dto/element/methods.twig @@ -4,7 +4,7 @@ {% else %} {{ element('method_set', field) }} {% endif %} -{% if field.nullable %} +{% if field.nullable and not immutable %} {{ element('method_set_or_fail', field) }} {% endif %} {{ element('method_get', field) }}