Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 362585

Summary: DBWS: Oracle DDL Parser should resolve types from other schemas
Product: z_Archived Reporter: Mike Norman <michael.norman>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: ASSIGNED --- QA Contact:
Severity: normal    
Priority: P3 CC: david.mccann, david.twelves, eclipselink.dbws-inbox, martin.grebac
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: oracle
Bug Depends on:    
Bug Blocks: 377655    

Description Mike Norman CLA 2011-11-01 14:26:52 EDT

    
Comment 1 Mike Norman CLA 2012-01-23 11:23:02 EST
Assume that we are using a schema U1 and have defined a new Object type
EMPLOYEE_CONTACT :

CREATE OR REPLACE TYPE EMPLOYEE_CONTACT IS OBJECT (
    EMP_NUMBER      NUMERIC,
    EMP_NAME        VARCHAR2(50),
    HOME_CONTACT    U2.CONTACT,
    WORK_CONTACT    U2.CONTACT
);

You can see that this Object type is using a type defined in the U2 schema:

CREATE OR REPLACE TYPE CONTACT IS OBJECT (
    HOME     VARCHAR2(40),
    BUSINESS VARCHAR2(40)
);
The new DBWSBuilder uses the DBMS_METADATA package to extract the DDL for any
table/procedure/package or type -  the U1 schema must have the
SELECT_ANY_DICTIONARY (or SELECT_CATALOG_ROLE) role assigned to it in order for the DBMS_METADATA package
to work:

SQL> grant select any dictionary to U1;
Grant succeeded.
Comment 2 Mike Norman CLA 2012-02-27 15:25:33 EST
In addition to the SELECT_ANY_DICTIONARY permission, the Oracle DDL Parser
code needs additional work to resolve references to types in other schemas.

Identifiers can now be ambiguous: does U2.CONTACT refer to <package>.<type>
in the current schema or <schema_name>.<table|type|whatever> in a different
schema?
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:24:57 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink