Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

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


Java Persistence API (JPA) Extensions Reference for EclipseLink, 2.4.x

SearchSearch

   Contents Contents


Previous Previous

Next Next

WarningBeta Draft: 2012-06-18


@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

databaseType

(Required) The name of the database array structure type.


targetClass

(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:

 


Previous Previous

Next Next

EclispeLink
EclipseLink logo EclipseLink Home • PDF PDF (coming soon)

SearchSearch

   Contents Contents

Back to the top