@Target(value={METHOD,FIELD}) @Retention(value=RUNTIME) public @interface ElementCollection
Example: @Entity public class Person { @Id protected String ssn; protected String name; ... @ElementCollection protected Set<String> nickNames = new HashSet(); ... }
Modifier and Type | Optional Element and Description |
---|---|
FetchType |
fetch
(Optional) Whether the collection should be lazily loaded or must be
eagerly fetched.
|
Class |
targetClass
(Optional) The basic or embeddable class that is the element
type of the collection.
|
public abstract Class targetClass
public abstract FetchType fetch
Copyright © 2019 Eclipse Foundation.
Use is subject to license terms.