Skip to content

Instantly share code, notes, and snippets.

@kinnerapriyap
Last active November 16, 2018 06:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kinnerapriyap/e386b9ff52cc3357fe66804594a451de to your computer and use it in GitHub Desktop.
Save kinnerapriyap/e386b9ff52cc3357fe66804594a451de to your computer and use it in GitHub Desktop.
@entity, @PrimaryKey and @Embedded in Kotlin
@Entity
data class Item {
@PrimaryKey
@Embedded ItemId id,
...
}
data class ItemId {
long categoryId,
int itemId
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment