| MapStruct updates a Set by using the getter if the Set is already containing objects. For some reason, the @NotEmpty annotation gets bypassed in this scenario (i.e., it is possible to persist an empty Set when using the getter even though the @NotEmpty annotation is used). This problem does not show when using the setter. Here is the link to a small project I created to demonstrate the bug: https://gitlab.com/melissa.koppeschaar/hibernate-bug-report |