Docs Menu

Docs HomeRealm

Ignore a Field - Kotlin SDK

To prevent a field from persisting in Realm Database or showing up in your Realm Schema, use the @Ignore annotation:

class ShoppingCart : RealmObject {
val _id: ObjectId = ObjectId()
@Ignore
val items: List<String> = listOf()
}
←  Timestamps - Kotlin SDKIndex a Field - Kotlin SDK →
Share Feedback
© 2023 MongoDB, Inc.

About

  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2023 MongoDB, Inc.