Skip to content

Instantly share code, notes, and snippets.

@hieuwu
Created March 21, 2022 14:53
Show Gist options
  • Save hieuwu/76e7d06908d66fad53b935fc5f4b681f to your computer and use it in GitHub Desktop.
Save hieuwu/76e7d06908d66fad53b935fc5f4b681f to your computer and use it in GitHub Desktop.
Line Item and Product One to one relationship
data class LineItemAndProduct(
@Embedded val lineItem: LineItem?,
@Relation(
parentColumn = "productId",
entityColumn = "productId",
entity = Product::class
)
val product: Product?
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment