Docs Menu

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: Long = Random.nextLong()
@Ignore
val items: List<String> = listOf()
}
←  Timestamps - Kotlin SDKIndex a Field - Kotlin SDK →
Give Feedback
© 2022 MongoDB, Inc.

About

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