Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 362002 - DBWSBuilder should generate CREATE and DROP DDL for 'shadow' JDBC types compatible with PL/SQL record + collection types
Summary: DBWSBuilder should generate CREATE and DROP DDL for 'shadow' JDBC types compa...
Status: RESOLVED FIXED
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:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-25 16:25 EDT by Mike Norman CLA
Modified: 2022-06-09 10:32 EDT (History)
1 user (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-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