Created
April 19, 2020 13:11
-
-
Save deepanshu42/0bf6cf87ac7d9ed6c5857cdabb109fec to your computer and use it in GitHub Desktop.
Embedded Objects Example
This file contains hidden or 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 street: String?, | |
| val state: String?, | |
| val city: String?, | |
| val postCode: Int | |
| ) | |
| @Entity | |
| data class User( | |
| @PrimaryKey val id: Int, | |
| val firstName: String?, | |
| @Embedded val address: Address? | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment