@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 © 2017 JBoss by Red Hat. All rights reserved.