Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "EclipseLink/UserGuide/JPA/2.4/a array"
m |
m |
||
Line 20: | Line 20: | ||
---- | ---- | ||
− | {| width=" | + | {| width="150" |
| align="center" | | | align="center" | | ||
[[EclipseLink/UserGuide/JPA/a_additionalcriteria|<- Previous]] | [[EclipseLink/UserGuide/JPA/a_additionalcriteria|<- Previous]] | ||
Line 111: | Line 111: | ||
|- | |- | ||
| valign="bottom" | | | valign="bottom" | | ||
− | {| width=" | + | {| width="150" |
|- | |- | ||
| | | |
Revision as of 12:50, 7 June 2012
Java Persistence API (JPA) Extensions Reference for EclipseLink Version 2.4.x |
|
@Array
Use @Array
to define object-relational data types supported by specific databases, such as Oracle VARRAY
types or PostgreSQL JDBC Struct
types.
Annotation Elements
Table 2-1 describes this annotation's elements.
Table 2-1 @Array Annotation Elements
Annotation Element | Description | Default |
---|---|---|
|
(Required) The name of the database array structure type. |
|
|
(Optional only if the collection field or property is defined using Java generics; otherwise Required) The class (basic or embeddable) that is the element type of the collection. |
Parameterized type of the collection. |
Usage
Use @Array
on a collection attribute that is persisted to an Array
type. The collection can be of basic types or embeddable class mapped using a Struct
.
Examples
Example 2-1 Using @Array with Oracle VARRAY
Example 2-2 Using @Array with Postgress Struct
See Also
For more information, see the following:
|
|