Fix SqlAstTranslator affected tablenames includes synch tables

This commit is contained in:
Andrea Boriero 2020-12-08 10:55:23 +01:00
parent 9a6465a72f
commit d32fb746d6
1 changed files with 22 additions and 22 deletions

View File

@ -43,29 +43,29 @@ public abstract class AbstractSqlAstTranslator
return affectedTableNames;
}
// @Override
// protected void renderTableGroup(TableGroup tableGroup) {
// super.renderTableGroup( tableGroup );
// ModelPartContainer modelPart = tableGroup.getModelPart();
//// if ( modelPart instanceof AbstractEntityPersister ) {
//// String[] querySpaces = (String[]) ( (AbstractEntityPersister) modelPart ).getQuerySpaces();
//// for ( int i = 0; i < querySpaces.length; i++ ) {
//// registerAffectedTable( querySpaces[i] );
//// }
//// }
// }
@Override
protected void renderTableGroup(TableGroup tableGroup) {
super.renderTableGroup( tableGroup );
ModelPartContainer modelPart = tableGroup.getModelPart();
if ( modelPart instanceof AbstractEntityPersister ) {
String[] querySpaces = (String[]) ( (AbstractEntityPersister) modelPart ).getQuerySpaces();
for ( int i = 0; i < querySpaces.length; i++ ) {
registerAffectedTable( querySpaces[i] );
}
}
}
// @Override
// protected void renderTableGroup(TableGroup tableGroup, Predicate predicate) {
// super.renderTableGroup( tableGroup, predicate );
// ModelPartContainer modelPart = tableGroup.getModelPart();
//// if ( modelPart instanceof AbstractEntityPersister ) {
//// String[] querySpaces = (String[]) ( (AbstractEntityPersister) modelPart ).getQuerySpaces();
//// for ( int i = 0; i < querySpaces.length; i++ ) {
//// registerAffectedTable( querySpaces[i] );
//// }
//// }
// }
@Override
protected void renderTableGroup(TableGroup tableGroup, Predicate predicate) {
super.renderTableGroup( tableGroup, predicate );
ModelPartContainer modelPart = tableGroup.getModelPart();
if ( modelPart instanceof AbstractEntityPersister ) {
String[] querySpaces = (String[]) ( (AbstractEntityPersister) modelPart ).getQuerySpaces();
for ( int i = 0; i < querySpaces.length; i++ ) {
registerAffectedTable( querySpaces[i] );
}
}
}
@Override