-
Sub-task
-
Resolution: Unresolved
-
Major
-
2.12.2.Final
-
None
When a field is not nullable (either with @Column(nullable=false) or with a @NotNull constraint) it would be helpful to generate a constructor with all the needed not null values (and a default constructor).
For example, here, I generate an Address entity with not null street1 and city. It would be good to generate a default constructor + another one with these two needed attributes :
@Entity public class Address implements Serializable { @Column(length = 50, nullable = false) @Size(min = 5, max = 50) @NotNull private String street1; @Column(length = 50, nullable = false) @Size(min = 2, max = 50) @NotNull private String city; public Address() { } public Address(String street1, String city) { this.street1 = street1; this.city = city; }