1) Create a Customerentity.
2) Create a Shop entity, create One to Many association attribute with Customer.
3) Add annotations @Size(min=1) and @Valid as it described in documentation.
4) Create browser and editor screens for both entities, Shop editor screen should contain a table with Customers
5) Run the app and create Shop without customers
A.R. Nothing happens
E.R. When an instance of Shop is validated, the list of customers will be checked for the fact that it contains at least one instance, and all instances of Shopin the list will also be validated.
Environment
Jmix version: 1.2.2
Cuba issue https://github.com/cuba-platform/cuba/issues/3125
Description of the bug or enhancement
1) Create a
Customer
entity. 2) Create aShop
entity, createOne to Many
association attribute withCustomer
. 3) Add annotations@Size(min=1)
and@Valid
as it described in documentation.4) Create browser and editor screens for both entities,
Shop
editor screen should contain a table withCustomers
5) Run the app and createShop
without customersA.R. Nothing happens E.R. When an instance of
Shop
is validated, the list of customers will be checked for the fact that it contains at least one instance, and all instances ofShop
in the list will also be validated.See the test project: prjvalid.zip