Configuration Null Values
Within a configuration item you can set a value to explicitly be null
. What that means in terms of configuration is dependent upon the context of where it is set.
To set a value to null
you need to add a special namespace to the config
tag, http://www.w3.org/2001/XMLSchema-instance
, and then use that to set the value nil
to true
for the value you want to set to null
.
So in the example below the overflowToDisk
value will explicitly set to null
<?xml version="1.0" encoding="UTF-8"?> <config xmlns="urn:com.cohga.server.config#1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ... <data:datadefinition id="..."> <datasourcedataconnection datasource="..." table="..." key="..."> ... <cache id="existing.cache.config"> <overflowToDisk xsi:nil="true"/> </cache> </datasourcedataconnection> </data:datadefinition> </config>
Initially you may think that setting the value to null
would appear to be the same thing as not setting the value at all, but as the example above shows what we're doing with the cache
tag is to override the settings in the cache definition, which is defined elsewhere, for this particular datasourcedataconnection
.
So in this example the datasourcedataconnection
will use the cache definition supplied by existing.cache.config
but with the overflowToDisk
value reset to its default. The default will be used because that's the normal handling for a cache definition where a value isn't set. Other configuration items may have different interpretations of what null
means for a specific value and this is outlined in the configuration reference for that item.