javax.persistence
Annotation Type ElementCollection
@Target(value={METHOD,FIELD})
@Retention(value=RUNTIME)
public @interface ElementCollection
The ElementCollection annotation defines a collection of instances of a basic
type or embeddable class. The ElementCollection annotation (or equivalent XML
element) must be specified if the collection is to be mapped by means of a
collection table
- Since:
- Java Persistence 2.0
targetClass
public abstract java.lang.Class targetClass
- Default:
- void.class
fetch
public abstract FetchType fetch
- Default:
- javax.persistence.FetchType.LAZY