can not be @Required or @NotNull

1

When using version 4.3.3 of REALM for android development I get the following error:

Error:Field "groupName" with type "pizware.evaluapp.Models.Group" cannot be @Required or @NotNull.

but I do not use any of those labels for any field. Does Alguein know what's going on?

    
asked by Erick piz 01.02.2018 в 02:29
source

1 answer

0

The @Required annotation tells Realm to apply controls to reject null values.

  

When the @Required annotation is added to a RealmList of primitive types, example:

RealmList <String>, RealmList <byte []>, RealmList <Boolean>, RealmList <Byte>,
 RealmList <Short>, RealmList <Integer>, RealmList <Long>, RealmList
 <Float>, RealmList <Double >, RealmList <Date>
  

, this can not contain null values.

Review the documentation related to the @Required notation

You should check in your classes if you are adding this annotation, regularly the problem is to define it in some class

 @Required 
 private MyClass myclase;
    
answered by 01.02.2018 в 19:12