|
From: SourceForge.net <no...@so...> - 2010-09-21 19:00:59
|
Bugs item #3046689, was opened at 2010-08-16 18:58 Message generated for change (Settings changed) made by chikkubhai You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=449491&aid=3046689&group_id=47439 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Bug Group: None Status: Open Resolution: None Priority: 7 Private: No Submitted By: wecansolveit.org (chikkubhai) Assigned to: matthias g (gommma) >Summary: HSQLDB catalog multiple schemas Initial Comment: If HsqlDB had multiple schemas as Catalogs !- PUBLIC !- Schemas !- SCHEMA1 !- SCHEMA2 ... QueryDataSet partialDataSet = new QueryDataSet(getDatabaseConnection(SCHEMA_NAME)); partialDataSet.addTable(TABLE_NAME, (" SELECT * FROM SCHEMA1.TABLE1"); FlatXmlDataSet.write(partialDataSet, new FileOutputStream(TABLE1.xml") exports as <?xml version='1.0' encoding='UTF-8'?> <dataset> <TABLE1 COL1="1" ...> </dataset> Where is the schema information here??? No wonder, the following fails: IDatabaseConnection connection = getDatabaseConnection("SCHEMA1"); DatabaseOperation.CLEAN_INSERT.execute(connection, IDataSet dataSet); ---------------------------------------------------------------------- Comment By: wecansolveit.org (chikkubhai) Date: 2010-09-21 14:44 Message: Is there no solution to this yet? What is the workaround for using hsqldb? ---------------------------------------------------------------------- Comment By: wecansolveit.org (chikkubhai) Date: 2010-08-16 18:59 Message: saying the table does not exist, had to include patch works in classes like operation.AbstractOperation.getOperationMetaData(IDatabaseConnection, ITableMetaData) and so on.. to check ITableMetaData tableMetaData= null; if(((IDataTypeFactory)(connection.getConfig().getProperty( DatabaseConfig.PROPERTY_DATATYPE_FACTORY))) instanceof HsqldbDataTypeFactory && connection.getSchema() != null) { (databaseConfig.getProperty(DatabaseConfig.FEATURE_QUALIFIED_TABLE_NAMES))).booleanValue()) { tableMetaData = databaseDataSet.getTableMetaData(connection.getSchema().concat("." + tableName)); } else{ tableMetaData = databaseDataSet.getTableMetaData(tableName); ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=449491&aid=3046689&group_id=47439 |
|
From: SourceForge.net <no...@so...> - 2010-09-21 19:01:07
|
Bugs item #3046689, was opened at 2010-08-16 18:58 Message generated for change (Settings changed) made by chikkubhai You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=449491&aid=3046689&group_id=47439 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Bug Group: None Status: Open Resolution: None >Priority: 9 Private: No Submitted By: wecansolveit.org (chikkubhai) Assigned to: matthias g (gommma) Summary: HSQLDB catalog multiple schemas Initial Comment: If HsqlDB had multiple schemas as Catalogs !- PUBLIC !- Schemas !- SCHEMA1 !- SCHEMA2 ... QueryDataSet partialDataSet = new QueryDataSet(getDatabaseConnection(SCHEMA_NAME)); partialDataSet.addTable(TABLE_NAME, (" SELECT * FROM SCHEMA1.TABLE1"); FlatXmlDataSet.write(partialDataSet, new FileOutputStream(TABLE1.xml") exports as <?xml version='1.0' encoding='UTF-8'?> <dataset> <TABLE1 COL1="1" ...> </dataset> Where is the schema information here??? No wonder, the following fails: IDatabaseConnection connection = getDatabaseConnection("SCHEMA1"); DatabaseOperation.CLEAN_INSERT.execute(connection, IDataSet dataSet); ---------------------------------------------------------------------- Comment By: wecansolveit.org (chikkubhai) Date: 2010-09-21 14:44 Message: Is there no solution to this yet? What is the workaround for using hsqldb? ---------------------------------------------------------------------- Comment By: wecansolveit.org (chikkubhai) Date: 2010-08-16 18:59 Message: saying the table does not exist, had to include patch works in classes like operation.AbstractOperation.getOperationMetaData(IDatabaseConnection, ITableMetaData) and so on.. to check ITableMetaData tableMetaData= null; if(((IDataTypeFactory)(connection.getConfig().getProperty( DatabaseConfig.PROPERTY_DATATYPE_FACTORY))) instanceof HsqldbDataTypeFactory && connection.getSchema() != null) { (databaseConfig.getProperty(DatabaseConfig.FEATURE_QUALIFIED_TABLE_NAMES))).booleanValue()) { tableMetaData = databaseDataSet.getTableMetaData(connection.getSchema().concat("." + tableName)); } else{ tableMetaData = databaseDataSet.getTableMetaData(tableName); ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=449491&aid=3046689&group_id=47439 |
|
From: SourceForge.net <no...@so...> - 2010-09-21 21:07:04
|
Bugs item #3046689, was opened at 2010-08-16 18:58 Message generated for change (Comment added) made by chikkubhai You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=449491&aid=3046689&group_id=47439 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Bug Group: None Status: Open Resolution: None Priority: 9 Private: No Submitted By: wecansolveit.org (chikkubhai) Assigned to: matthias g (gommma) Summary: HSQLDB catalog multiple schemas Initial Comment: If HsqlDB had multiple schemas as Catalogs !- PUBLIC !- Schemas !- SCHEMA1 !- SCHEMA2 ... QueryDataSet partialDataSet = new QueryDataSet(getDatabaseConnection(SCHEMA_NAME)); partialDataSet.addTable(TABLE_NAME, (" SELECT * FROM SCHEMA1.TABLE1"); FlatXmlDataSet.write(partialDataSet, new FileOutputStream(TABLE1.xml") exports as <?xml version='1.0' encoding='UTF-8'?> <dataset> <TABLE1 COL1="1" ...> </dataset> Where is the schema information here??? No wonder, the following fails: IDatabaseConnection connection = getDatabaseConnection("SCHEMA1"); DatabaseOperation.CLEAN_INSERT.execute(connection, IDataSet dataSet); ---------------------------------------------------------------------- >Comment By: wecansolveit.org (chikkubhai) Date: 2010-09-21 17:07 Message: The solution to this problem is two ways: one is to add the schema to the dataset itself and db2 seems to have some strange issues which were resolved as per : https://sourceforge.net/tracker/index.php?func=detail&aid=2838922&group_id=47439&atid=449491 connection.getConfig().setProperty(DatabaseConfig.FEATURE_QUALIFIED_TABLE_NAMES, true); // FIX for error: java.lang.IllegalStateException: Did not find column 'ACCOUNT_ID_I' for <schema.table> 'REFERENCE_DATA.VW_REF_ACCOUNT' in catalog 'NYTXDI01' because names do not exactly match. // http://sourceforge.net/tracker/index.php?func=detail&aid=2838922&group_id=47439&atid=449491 connection.getConfig().setProperty(DatabaseConfig.PROPERTY_METADATA_HANDLER, new Db2MetadataHandler()); connection.getConfig().setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new Db2DataTypeFactory()); connection.getConfig().setProperty(DatabaseConfig.PROPERTY_TABLE_TYPE, new String[] {"TABLE", "ALIAS"}); ---------------------------------------------------------------------- Comment By: wecansolveit.org (chikkubhai) Date: 2010-09-21 14:44 Message: Is there no solution to this yet? What is the workaround for using hsqldb? ---------------------------------------------------------------------- Comment By: wecansolveit.org (chikkubhai) Date: 2010-08-16 18:59 Message: saying the table does not exist, had to include patch works in classes like operation.AbstractOperation.getOperationMetaData(IDatabaseConnection, ITableMetaData) and so on.. to check ITableMetaData tableMetaData= null; if(((IDataTypeFactory)(connection.getConfig().getProperty( DatabaseConfig.PROPERTY_DATATYPE_FACTORY))) instanceof HsqldbDataTypeFactory && connection.getSchema() != null) { (databaseConfig.getProperty(DatabaseConfig.FEATURE_QUALIFIED_TABLE_NAMES))).booleanValue()) { tableMetaData = databaseDataSet.getTableMetaData(connection.getSchema().concat("." + tableName)); } else{ tableMetaData = databaseDataSet.getTableMetaData(tableName); ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=449491&aid=3046689&group_id=47439 |