| Summary: | DBWS: Oracle DDL Parser should resolve types from other schemas | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Mike Norman <michael.norman> |
| Component: | Eclipselink | Assignee: | 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
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.
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? The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |