Created
October 22, 2017 09:38
-
-
Save AkshayChordiya/35d5dda6a4727c9a93d835a2ab206015 to your computer and use it in GitHub Desktop.
User entity model with composite primary key
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Entity(tableName = "users", primaryKeys = arrayOf("id", "name")) | |
data class User( | |
var id: Int = 0, | |
var name: String = "" | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment