Skip Headers

# Object-Relational Array Mapping

Previous

Next

In an object-relational data model, structures can contain arrays (collections of other data types). These arrays can contain primitive data types or collections of other structures.

TopLink maps arrays of primitive data types with the `ArrayMapping` class. An array mapping maps to object-relational array data types (the `Array` type in JDBC and the `VARRAY` type in Oracle Database). To map a collection of aggregate structures, use an object array mapping (see "Object-Relational Object Array Mapping").

The object-relational database stores the arrays with their parent structure in the same table. To store information in a separate table from the parent structure's table, use a nested table mapping (see "Object-Relational Nested Table Mapping").

All elements in the array must be the same data type. The number of elements in an array controls the size of the array. An Oracle Database allows arrays of variable sizes (the `VARRAY` type).

See "Configuring an Object-Relational Array Mapping" for more information.