There is problem with hibernate tools when exists two object with same name in different (oracle)
schema (select default schema or schema in reveng file don't help)
tools claim that exists column mapping for tabel already
this code is problem (JDBCReader.java in tools line 397)
Code:
if ( ("TABLE".equals(tableType) || "VIEW".equals(tableType) /*|| "SYNONYM".equals(tableType) */)
// ("SYNONYM".equals(tableType) && isOracle() ) ) { // only on oracle ? TODO: HBX-218
// it's a regular table or a synonym
// ensure schema and catalogname is truly empty (especially mysql returns null schema, ""
if(schemaName!=null && schemaName.trim().length()==0) {
schemaName = null;
}
if(catalogName!=null && catalogName.trim().length()==0) {
catalogName=null;
}
log.debug("Adding table " + tableName + " of type " + tableType);
progress.startSubTask("Found " + tableName);
Table table = dbs.addTable(quote(getSchemaForModel(schemaName)), getCatalogForModel(catal
table.setComment(comment);
}
This set schema to null and tools try map object (table/view) twice.
This is workaround for any mysql bug, but introduce bug for correct schema aware database
regards