Skip to content

Commit

Permalink
reset metadata on SQL event -- it may be altering table
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed Oct 23, 2008
1 parent f0d5c2d commit 16a18b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Expand Up @@ -118,7 +118,7 @@ public TableTemplate(JdbcTemplate jdbcTemplate, IDbDialect dbDialect, String tab
}

public void resetMetaData() {
table = dbDialect.getMetaDataFor(null, schema, tableName, true);
table = dbDialect.getMetaDataFor(null, schema, tableName, false);
allMetaData = new HashMap<String, Column>();
statementMap = new HashMap<DmlType, StatementBuilder>();
keyMetaData = null;
Expand Down
Expand Up @@ -339,6 +339,7 @@ protected void runSql(String sql) {
logger.debug("Running SQL: " + sql);
}
jdbcTemplate.execute(sql);
context.getTableTemplate().resetMetaData();
}

protected void runDdl(String xml) {
Expand Down

0 comments on commit 16a18b0

Please sign in to comment.