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

Bug 362002

Summary: DBWSBuilder should generate CREATE and DROP DDL for 'shadow' JDBC types compatible with PL/SQL record + collection types
Product: z_Archived Reporter: Mike Norman <michael.norman>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: eclipselink.dbws-inbox
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Mike Norman CLA 2011-10-25 16:25:51 EDT

    
Comment 1 Mike Norman CLA 2011-11-03 10:21:43 EDT
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 U1schema must have the
SELECT_CATALOG_ROLE role assigned to it in order for the DBMS_METADATA package
to work:

SQL> grant select_catalog_role to U1;
Grant succeeded.

So, in addition to generating DDL for 'shadow' JDBC types compatible with PL/SQL record + collection types, we must also generate some 'SYSDBA' commands as well
Comment 2 Mike Norman CLA 2012-01-23 11:25:01 EST
separate out issue of data dictionary access from DDL generation:
 - https://bugs.eclipse.org/bugs/show_bug.cgi?id=362585
       Oracle DDL Parser should resolve types from other schemas
Comment 3 Mike Norman CLA 2012-01-23 11:27:21 EST
fix in SVN revisions: 10702, 10710, 10715, 10721, 10723

New class o.e.p.tools.dbws.oracle.ShadowDDLGenerator generates
same 'shadow' DDL that the JPublisher code did
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:32:05 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink