CUBA Studio IDEA plugin doesn't add "not null" column option into DDL Preview script

I added @NotNull option to a table column but there were no changes in DDL Preview script and no newly generated update database scripts. So I cannot get right table structure without its’ manual correction.
CUBA Studio plugin v10.0.NIGHTLY48-183

1 Like

If you add only @NotNull annotation to a table in Entity class code you define a Bean Validation constraint. Bean validation is an optional mechanism that provides uniform validation of data on the middleware, in Generic UI and REST API.

If you want to check the data in DB, you need to add nullable = false option to the @Column annotation

See the example:

@Column(name = "NAME", nullable = false)
protected String name;
1 Like