![]() To mark a field as a model’s primary key, use the annotation The field type must be either a string ( String) or an integer ( byte, short, int, long, Byte, Short, Integer, and Long). ![]() Fields with RealmObject type are always nullable. Only Boolean, Byte, Short, Integer, Long, Float, Double, String, byte and Date can be annotated with If you add it to other field types, compilation will fail.įields with primitive types and the RealmList type are required implicitly. The annotation can be used to tell Realm to disallow null values in a field, making it required rather than optional. The boxed types Boolean, Byte, Short, Integer, Long, Float and Double can also be used in model classes. In addition to those standard field types, Realm supports subclasses of RealmObject and RealmList to model relationships. ![]() The integer types byte, short, int, and long are all mapped to long within Realm. ![]() Realm supports boolean, byte, short, int, long, float, double, String, Date and byte field types. Define your model class by extending RealmObject public class Dog extends RealmObject Field types ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |