[#1774] QueryPart.toString() does not load default settings from
classpath
This commit is contained in:
parent
2a235ff569
commit
4f5593d8b4
@ -95,7 +95,7 @@ public class SchemaMapping implements Serializable {
|
||||
* @deprecated - 2.0.5 - Do not reuse this SchemaMapping!
|
||||
*/
|
||||
@Deprecated
|
||||
public static final SchemaMapping NO_MAPPING = new SchemaMapping(new Settings(), true);
|
||||
public static final SchemaMapping NO_MAPPING = new SchemaMapping(SettingsTools.defaultSettings(), true);
|
||||
|
||||
private final RenderMapping mapping;
|
||||
private final boolean ignoreMapping;
|
||||
@ -300,8 +300,11 @@ public class SchemaMapping implements Serializable {
|
||||
* @return The configured schema
|
||||
*/
|
||||
public Schema map(Schema schema) {
|
||||
if (ignoreMapping) return schema;
|
||||
|
||||
// [#1774] The default Settings render schema flag takes precedence over
|
||||
// The DefaultConfiguration's ignoreMapping flag!
|
||||
if (!renderSchema) return null;
|
||||
if (ignoreMapping) return schema;
|
||||
|
||||
Schema result = null;
|
||||
if (schema != null) {
|
||||
|
||||
@ -44,6 +44,7 @@ import javax.sql.DataSource;
|
||||
import org.jooq.Configuration;
|
||||
import org.jooq.SQLDialect;
|
||||
import org.jooq.conf.Settings;
|
||||
import org.jooq.conf.SettingsTools;
|
||||
|
||||
/**
|
||||
* The default configuration, if no other configuration is supplied
|
||||
@ -89,7 +90,7 @@ final class DefaultConfiguration implements Configuration {
|
||||
|
||||
@Override
|
||||
public final Settings getSettings() {
|
||||
return new Settings();
|
||||
return SettingsTools.defaultSettings();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Loading…
Reference in New Issue
Block a user