public annotation OneToMany( mappedBy as String = "", fetch as FetchType = FetchType.LAZY, cascade as IList<CascadeType> = [], orphanRemoval as Boolean = false )
Declares a one-to-many entity relationship.
A one-to-many relationship is lazy by default, matching JPA semantics. mappedBy identifies the property that owns the relationship on the target entity. An empty value denotes a unidirectional relationship whose physical mapping is provided by the active data provider.
import klyn.collections import klyn.data.mapping @OneToMany( mappedBy="customer", cascade=[CascadeType.PERSIST], orphanRemoval=true ) public property orders as List<Order>