Skip to content

Allow make:entity ask for unique fields or assertions #1178

Open
@omgslinux

Description

@omgslinux

I miss the generator to prevent from "forgetting" to have the "skeleton" and basic constraints for unique keys, via both assertion and bbdd unique key(s). The desired result would be to have a kind of basic declaration of both at the top of the class declaration, near the @ORM\Entity annotation, so they can be easily adjusted later.

I'm not sure how to accomplish this. I think that when creating an entity, it would be nice to be prompted something like 'Does this entity have unique keys?', and if yes, generate the mentioned code. Also, for each field, ask or at least try to guess a basic assertion (for example, NotNull after answering the question about if the field can be null in the database), using a similar philosophy when trying to guess the field type in form classes when the field type class is null.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions