| Summary: | DBWS should support non-associative PLSQL collections | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Mike Norman <michael.norman> | ||||||||
| Component: | Eclipselink | Assignee: | Nobody - feel free to take it <nobody> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | david.mccann, eclipselink.dbws-inbox | ||||||||
| Version: | unspecified | ||||||||||
| Target Milestone: | --- | ||||||||||
| Hardware: | All | ||||||||||
| OS: | All | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Mike Norman
The behaviour of PLSQL collection contructors changed when associative
array were added to the language (9i). Non-associative collections require
the constructor to be called:
...
aPlsqlItem MY_PACKAGE.MY_ARRAY;
BEGIN
IF aSqlItem.COUNT > 0 THEN
aPlsqlItem := MY_PACKAGE.MY_ARRAY();
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FOR I IN 1..aSqlItem.COUNT LOOP
aPlsqlItem(I) := aSqlItem(I);
END LOOP;
The unfortunate thing is that the above code throws a 'weird' error
when the collection IS associative
PLS-00222: no function with name 'MY_ARRAY' exists in this scope
We need a way to get metadata information discovered at design-time
(is the collection associative?) passed to EclipseLink runtime so that
the generated nested function code in the anonymous PLSQL block can take
the incompatible behaviour into account and generate (or not) the appropriate
constructor call.
Created attachment 209102 [details]
Proposed fix.
Created attachment 209103 [details]
Supporting test cases.
Created attachment 209134 [details]
Proposed fix v2 (post review)
Changed xpath of isNonAssociative mapping on the PLSQLargument descriptor from a text node to an attribute - '@non-associative'.
Reviewed by: michael.norman@oracle.com Tests: all DBWS unit tests pass as expected; core LRG passes; added NonAssociativePLSQLCollectionTestSuite Revision: 10652 Fixed. The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |