This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 362585 - DBWS: Oracle DDL Parser should resolve types from other schemas
Summary: DBWS: Oracle DDL Parser should resolve types from other schemas
Status: ASSIGNED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard: oracle
Keywords:
Depends on:
Blocks: 377655
  Show dependency tree
 
Reported: 2011-11-01 14:26 EDT by Mike Norman CLA
Modified: 2022-06-09 10:24 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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