You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Gary Shank (JIRA)" <ji...@apache.org> on 2014/12/05 14:04:12 UTC

[jira] [Commented] (OPENJPA-1925) Mapping tool needs to recognize the use of tablespaces for DB2 on z/OS

    [ https://issues.apache.org/jira/browse/OPENJPA-1925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14235453#comment-14235453 ] 

Gary Shank commented on OPENJPA-1925:
-------------------------------------

I need this feature as well - I'm surprised to see this was opened back on 2011 and there is still no resolution.

> Mapping tool needs to recognize the use of tablespaces for DB2 on z/OS
> ----------------------------------------------------------------------
>
>                 Key: OPENJPA-1925
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1925
>             Project: OpenJPA
>          Issue Type: Improvement
>          Components: tooling
>    Affects Versions: 1.0.4, 1.0.5, 1.1.0, 1.1.1, 1.2.2, 1.2.3, 1.3.0, 2.0.1, 2.0.2, 2.1.0, 2.2.0
>         Environment: DB2 on z/OS
>            Reporter: Kevin Sutter
>
> The problem is by default OpenJPA tries to create tables in the default system database. Most DB2 on z/OS users do not have authority to do this and need their own database and possibly table space to store the data. I had to manually generate the DDL to create the tables using the mapping tool then edit it before running the SQL. For example following is part of the default DDL that was generated.
>  
> CREATE TABLE SchemaToUse.Ask (id BIGINT NOT NULL, price DOUBLE, volume INTEGER, version INTEGER, STOCK_SYMBOL VARCHAR(254), TRADE_ID BIGINT, SELLER_NAME VARCHAR(254), PRIMARY KEY (id));
>  
> And following is the create table statement I had to use to create the table on z/OS.
>  
> CREATE TABLE SchemaToUse.Ask (id BIGINT NOT NULL, price DOUBLE, volume INTEGER, version INTEGER, STOCK_SYMBOL VARCHAR(254), TRADE_ID BIGINT, SELLER_NAME VARCHAR(254), PRIMARY KEY (id)) in databaseName.tablespaceName;
>  
> A default index was not created on the primary key so I also had to execute
>  
> CREATE UNIQUE INDEX schemaToUse.idx1 ON schemaToUse.Ask (ID ASC);
>  
> Also, I could not get the mapping Ant task to work after reading the documentation so had to create a batch file with hard coded paths to run the mapping tool. Adding a schema export target to OpenJPA samples could be a useful addition.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)