Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 361701 - Update @Array annotation to support PostGreSQL integer[] type or provide an alternate way to configure that type of column
Summary: Update @Array annotation to support PostGreSQL integer[] type or provide an a...
Status: REOPENED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-21 14:54 EDT by Lucas Madar CLA
Modified: 2022-06-09 10:23 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Madar CLA 2011-10-21 14:54:18 EDT
It appears that the @Array annotation added in 2.3 only works for object-relational datatypes (structs).

Given the following snippet:

@Array
@Column( name = "VALUE" )
List<Integer> values;

This appears to create an ArrayMapping, which is desired, and it passes the values down to line 752 of AbstractCompositeDirectCollectionMapping, where it calls getDescriptor().buildFieldValueFromDirectValues(). However, the descriptor is of type RelationalDescriptor, which throws an exception when this is called (DescriptorException.normalDescriptorsDoNotSupportNonRelationalExtensions).
Comment 1 Tom Ware CLA 2011-10-21 15:10:46 EDT
@Array is designed for ObjectRelational types.

Depending on what you are trying to do here, you may want to file an enhancement request requesting the functionality you are looking for.
Comment 2 Lucas Madar CLA 2011-10-21 15:25:36 EDT
Essentially, I have a table column that is an array of integers. (This is in postgresql, by the way, using integer[] as a column type).

From the code comments in the @Array class:
"Arrays can contains [sic] basic types (VARCHAR) or other Struct types, and can be stored in a column or in a Struct type."

So, either that documentation is incorrect, it is specific to Oracle, or it is not implemented as stated.
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:23:30 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink