OneToMany
annotation in package klyn.data.mapping

    public annotation OneToMany(
    mappedBy as String = "",
    fetch as FetchType = FetchType.LAZY,
    cascade as IList<CascadeType> = [],
    orphanRemoval as Boolean = false
    )

OneToMany

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.

Example

    import klyn.collections
    import klyn.data.mapping

    @OneToMany(
    mappedBy="customer",
    cascade=[CascadeType.PERSIST],
    orphanRemoval=true
    )
    public property orders as List<Order>