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 28: | Line 28: | ||
| | | | ||
|} | |} | ||
+ | |||
+ | [[Image:Elug_draft_icon.png|Warning]]Beta Draft: 2012-06-18 | ||
<span id="CHDDDFDA"></span> | <span id="CHDDDFDA"></span> |
Revision as of 14:43, 18 June 2012
|
@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-2 describes this annotation's elements.
Table 2-2 @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-5 shows how to use this annotation with an Oracle VARRAY
type.
Example 2-5 Using @Array with Oracle VARRAY
Example 2-6 shows how to use this annotation with an Postgress Struct
type.
Example 2-6 Using @Array with Postgress Struct
See Also
For more information, see the following:
|
|
|