PersistenceJoinOne

annotation class PersistenceJoinOne(val foreignKey: String)(source)

Marks a constructor property as a to-one relation (N:1 or 1:1) through a foreign key of this entity.

foreignKey is the foreign key column of this entity, which follows the same formatting principles as described in PersistenceColumn. The key column it references is resolved from the database schema. How the relation is written is decided by PersistenceManageLinks or PersistenceManageChildren.

@PersistenceJoinOne("GAME_ID")
val game: GameRef,

Properties

Link copied to clipboard