Skip to content

Suggestion: Make all fields nullable by default #687

Open
@ThomasLandauer

Description

@ThomasLandauer

Am I right that the suggested (default) answer to the nullable-question ("Can this field be null in the database (nullable)") is always NO? I'm suggesting to change this to YES.

Why? When you want to set up a form (or EasyAdmin) for this entity, the fields need to be nullable, see #198 (comment) and EasyCorp/EasyAdminBundle#3889 (comment)
(more precise: the setter/getter needs to be nullable, not necessarily the field in the database)

And the purpose of the maker bundle is to generate off-the-shelf entities quickly, isn't it? So generating entities that are "incompatible" with Symfony forms doesn't make sense to me.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions