In the following example, FolderItem::class
belongs to the value
property of Junction
, even though it is not explicitly stated:
class FolderWithItems(
@Embedded
val folder: Folder,
@Relation(
associateBy = Junction(
FolderItem::class,
parentColumn = "folder_id",
entityColumn = "item_id"
),
parentColumn = "id",
entityColumn = "id"
)
val items: List<Item>
)
It compiles and runs the same as if I were to write out:
value = FolderItem::class
What is the Kotlin principle/rule/language feature that allows you to not have to specify value =
in this case?