IBMStockTrader/stocktrader-operator

Add Field to Specify DB2 Schema Name

Opened this issue · 1 comments

As of right now, you have to specify the Schema Name when running the SQL Statements to create the tables for Stocktrader Portfolios. For example, the SQL Statement for the Portfolio Table needs to look like
CREATE TABLE "<SCHEMA NAME>".Portfolio(owner VARCHAR(32) NOT NULL, total DOUBLE, accountID VARCHAR(64), PRIMARY KEY(owner));

This could be configurable somehow.

Yes, right now it assumes the schema name is the ID with which you logged in to the database. Like if you logged in as db2admin, then it assumes the table will be db2admin.Portfolio. I agree making this configurable, so that the schema name doesn't have to be login name, would be a good enhancement. Need to think about how best to implement that (I assume that would need to get specified in the JPA annotations in the POJO for each table).