Skip to content

Instantly share code, notes, and snippets.

@tarek360
Created March 25, 2018 12:48
Show Gist options
  • Select an option

  • Save tarek360/81f03699af3a0dc35d987461e15a9a9a to your computer and use it in GitHub Desktop.

Select an option

Save tarek360/81f03699af3a0dc35d987461e15a9a9a to your computer and use it in GitHub Desktop.
@Entity(tableName = "matches",
foreignKeys = [
ForeignKey(entity = UserEntry::class,
parentColumns = arrayOf("id"),
childColumns = arrayOf("id"))
])
data class UserEntry(
@PrimaryKey @ColumnInfo(name = "id") var id: Long? = null,
@ColumnInfo(name = "name") var name: String? = null,
var rightEye: EyeEntry? = null,
var leftEye: EyeEntry? = null
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment