cuba
cuba copied to clipboard
Cascade validation of related objects is not working
Environment
- Platform version: 7.2.10
- Forum issue https://www.cuba-platform.ru/discuss/t/kaskadnaya-validacziya-kolekczii/5233
Description of the bug or enhancement
- Create a Customer entity
- Create a Shop entity, create One to Many association attribute with Customer
- Add annotations
@Size(min=1)and@Validas it described in documentation
@OneToMany(mappedBy = "shop")
@Size(min = 1)
@Valid
private List<Customer> customers;
- Create browser and editor screens for both entities, Shop editor screen should contain a table with Customers
- 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 Product in the list will also be validated
Is it a regression? What is the version of CUBA where it works?
Does not work in any version of platform 7.2 Label changed for bug