Is there a way to make one key's all properties notNull with a single annotation? #378
Replies: 1 comment
-
Hi @EdwardJunyan, I've played around with this idea but couldn't come up with an easy solution from the top of my head. One idea would be to write a Creating a separate subtype where all properties are mandatory seems the easier approach to me at this point. 🤔 |
Beta Was this translation helpful? Give feedback.
-
Here is the situation:
I only want to make
spotB
and spotB'slongitude
&latitude
be@NonNull
.How to make it happen without creating unnecessary
Position
class?Is there a way I put an annotation on the
spotB
and it's all properties will be nonNull?Here is my goal
Beta Was this translation helpful? Give feedback.
All reactions