Skip to content

Commit

Permalink
[jOOQ#5360] [jOOQ#5373] Restored suggested logging from PR
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaseder committed Jul 4, 2016
1 parent 2cc5194 commit e91da53
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions jOOQ-meta/src/main/java/org/jooq/util/DefaultColumnDefinition.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@

import java.util.List;

import org.jooq.tools.JooqLogger;

/**
* A base implementation for column definitions.
*
Expand All @@ -54,8 +56,9 @@ public class DefaultColumnDefinition
extends AbstractTypedElementDefinition<TableDefinition>
implements ColumnDefinition {

private final int position;
private final boolean isIdentity;
private static final JooqLogger log = JooqLogger.getLogger(DefaultColumnDefinition.class);
private final int position;
private final boolean isIdentity;

public DefaultColumnDefinition(TableDefinition table, String name, int position, DataTypeDefinition type,
boolean isIdentity, String comment) {
Expand All @@ -69,7 +72,12 @@ public DefaultColumnDefinition(TableDefinition table, String name, int position,
private static boolean isSyntheticIdentity(DefaultColumnDefinition column) {
AbstractDatabase db = (AbstractDatabase) column.getDatabase();
String[] syntheticIdentities = db.getSyntheticIdentities();
return !db.filterExcludeInclude(singletonList(column), null, syntheticIdentities, db.getFilters()).isEmpty();
boolean match = !db.filterExcludeInclude(singletonList(column), null, syntheticIdentities, db.getFilters()).isEmpty();

if (match)
log.info("Synthetic Identity: " + column.getQualifiedName());

return match;
}

@Override
Expand Down

0 comments on commit e91da53

Please sign in to comment.