Annotation Type RealmClass

    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      boolean embedded
      Define objects of this type as "Embedded".
      RealmNamingPolicy fieldNamingPolicy
      The naming policy applied to all fields in this class.
      String name
      Manually set the internal name used by Realm for this class.
      String value
      Manually set the internal name used by Realm for this class.
      • embedded

        boolean embedded
        Define objects of this type as "Embedded". Embedded objects have a slightly different behavior than normal objects:
        • They must have exactly 1 parent linking to them when the embedded object is added to the Realm. Embedded objects can be the parent of other embedded objects. The parent cannot be changed later, except by copying the object.
        • They cannot have fields annotated with \@PrimaryKey.
        • When a parent object is deleted, all embedded objects are also deleted.
        • It is possible to define an easy reference to the parent object using the \@LinkingObjects annotation:
                   
                        \@LinkingObjects
                        public Parent parent;
                   
                   
        Default:
        false