Loading
Java Persistence API (JPA) Extensions Reference for EclipseLink, Release 2.4
  Go To Table Of Contents
Contents
 Search
Other Searches
 PDF
PDF
Comments
Comments


@Structure

Use @Structure on a field/method to define a StructureMapping to an embedded Struct type. The target Embeddable must be mapped using the Struct annotation.


Annotation Elements

This annotation contains no elements.


Usage

Struct types are extended object-relational data-types supported by some databases. Struct types are user define types in the database such as OBJECT types on Oracle. Structs can normally contains Arrays (VARRAY) or other Struct types, and can be stored in a column or a table.


Examples

Example 2-108 shows how to use the @Structure annotation. See Example 2-103 to an example of using @Struct to map the target.

Example 2-108 Using @Structure Annotation

@Structure
protected Address address;
 

You can also define structure mappings in the eclipselink-orm.xml file by using the <structure> element.

Example 2-109 Using <structure> XML

<structure name="address"/>
 


See Also

For more information, see:

Comments powered by Disqus