Field Types - Java SDK
Realm Database supports the following field data types:
Long types and their
lowercase primitive alternatives are all stored as
within Realm Database. Similarly, Realm Database stores objects
float types as type
Realm does not support fields with modifiers
volatile, though you can use fields with those modifiers if you
ignore them. If you choose to provide custom
constructors, you must declare a public constructor with no arguments.
Updating Strings and Byte Arrays
Since Realm Database operates on fields as a whole, it's not possible to directly update individual elements of strings or byte arrays. Instead, you'll need to read the whole field, make your modification to individual elements, and then write the entire field back again in a transaction block.
Object IDs and UUIDs
UUID (Universal Unique Identifier) both provide
unique values that can be used as identifiers for objects.
ObjectId is a MongoDB-specific
12-byte unique value.
UUID is a standardized 16-byte
unique value. Both types are indexable
and can be used as primary keys.