on 06-22-2022 5:50 AM
Hi CAP Team/Community,
The @mandatory annotation seems to work only if a property is completely missing, but doesn't check if it's an array with an empty record -- see below.
I would think that CAP should also fail the mandatory check for empty arrays. Is there anything I'm missing or does this warrant a feature request?
Test without outputChannels:
Test with empty outputChannels:
Thanks and regards,
Jhodel
I tested it on a project and it does behave like that. I think the handler in the generic provider may be just checking if the property has any value at all, since these types are stored as NCLOB in SQL (see preview), if you use an empty array the db table would probably store "[]" as a literal which is (technically) not empty. If you want to check a different value you will have to code a custom handler
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
67 | |
8 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.