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(primaryKeys = {"categoryId","itemID"}) | |
data class Item { | |
... | |
} |
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 | |
public class Item { | |
@EmbeddedId ItemId id; | |
... | |
} | |
@Embeddable | |
class ItemId { | |
long categoryId; | |
int itemId; |
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
data class Address( | |
val addressLine1: String, | |
val addressLine2: String, | |
val city: String, | |
val country: String, | |
val pincode: Int | |
) |
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 | |
data class Person( | |
@PrimaryKey(autoGenerate = true) | |
val id: Long, | |
@SerializedName("name") | |
val personName: String, | |
val addressLine1: String, | |
val addressLine2: String, | |
val city: String, | |
val country: String, |
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
data class Person( | |
val id: Long, | |
val name: String, | |
val addressLine1: String, | |
val addressLine2: String, | |
val city: String, | |
val country: String, | |
val pincode: Int, | |
val phoneNumber: String | |
) |
NewerOlder