Mybatis condition on configuration parameter
===

I'm trying to have a conditional query fragment, based upon a parameter which comes from the mybatis configuration, rather than a query parameter. Something like this:

    <sql id="frag">
        <if test="col_name != null">
            SELECT * FROM TABLE WHERE ${col.name}=#{value}
        </if>
        <if test="col_name == null">
            SELECT * FROM TABLE WHERE SAMPLECOL=#{value}
        </if>
    </sql>

where the value of `col_name` is a global parameter, specified inside the .properties file read by the mybatis configuration.

Apparently this does not work; looking at the source code, it seems that the OGNL expression evaluator is not aware of the configuration properties (which instead are working when I have the parameter substitution, through `${...}` inside the SQL). Did anybody find a way to do this?