[#3496] Log a DEBUG message when a Query is executed which returns Query.isExecutable() == false
This commit is contained in:
parent
b2b5118fbf
commit
7c9177ea86
@ -355,9 +355,8 @@ abstract class AbstractQuery extends AbstractQueryPart implements Query, Attacha
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (log.isDebugEnabled()) {
|
||||
if (log.isDebugEnabled())
|
||||
log.debug("Query is not executable", this);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -62,6 +62,7 @@ import org.jooq.Table;
|
||||
import org.jooq.TableField;
|
||||
import org.jooq.TableRecord;
|
||||
import org.jooq.UpdatableRecord;
|
||||
import org.jooq.tools.JooqLogger;
|
||||
|
||||
/**
|
||||
* A record implementation for a record originating from a single table
|
||||
@ -75,8 +76,9 @@ public class TableRecordImpl<R extends TableRecord<R>> extends AbstractRecord im
|
||||
/**
|
||||
* Generated UID
|
||||
*/
|
||||
private static final long serialVersionUID = 3216746611562261641L;
|
||||
private final Table<R> table;
|
||||
private static final long serialVersionUID = 3216746611562261641L;
|
||||
private static final JooqLogger log = JooqLogger.getLogger(TableRecordImpl.class);
|
||||
private final Table<R> table;
|
||||
|
||||
public TableRecordImpl(Table<R> table) {
|
||||
super(table.fields());
|
||||
@ -150,7 +152,12 @@ public class TableRecordImpl<R extends TableRecord<R>> extends AbstractRecord im
|
||||
addChangedValues(storeFields, insert);
|
||||
|
||||
// Don't store records if no value was set by client code
|
||||
if (!insert.isExecutable()) return 0;
|
||||
if (!insert.isExecutable()) {
|
||||
if (log.isDebugEnabled())
|
||||
log.debug("Query is not executable", this);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// [#1596] Set timestamp and/or version columns to appropriate values
|
||||
BigInteger version = addRecordVersion(insert);
|
||||
|
||||
@ -72,6 +72,7 @@ import org.jooq.UpdateQuery;
|
||||
import org.jooq.exception.DataAccessException;
|
||||
import org.jooq.exception.DataChangedException;
|
||||
import org.jooq.exception.InvalidResultException;
|
||||
import org.jooq.tools.JooqLogger;
|
||||
import org.jooq.tools.StringUtils;
|
||||
|
||||
/**
|
||||
@ -86,7 +87,8 @@ public class UpdatableRecordImpl<R extends UpdatableRecord<R>> extends TableReco
|
||||
/**
|
||||
* Generated UID
|
||||
*/
|
||||
private static final long serialVersionUID = -1012420583600561579L;
|
||||
private static final long serialVersionUID = -1012420583600561579L;
|
||||
private static final JooqLogger log = JooqLogger.getLogger(UpdatableRecordImpl.class);
|
||||
|
||||
public UpdatableRecordImpl(Table<R> table) {
|
||||
super(table);
|
||||
@ -209,7 +211,12 @@ public class UpdatableRecordImpl<R extends UpdatableRecord<R>> extends TableReco
|
||||
Utils.addConditions(update, this, keys);
|
||||
|
||||
// Don't store records if no value was set by client code
|
||||
if (!update.isExecutable()) return 0;
|
||||
if (!update.isExecutable()) {
|
||||
if (log.isDebugEnabled())
|
||||
log.debug("Query is not executable", this);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// [#1596] Set timestamp and/or version columns to appropriate values
|
||||
BigInteger version = addRecordVersion(update);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user