I would like to react on the environment in my Mapper XML file.
The environment is set into the SqlSessionFactoryBuilder
new SqlSessionFactoryBuilder().build(is, environment)
Now I want to use this environment variable in my if condition.
I tried this:
SELECT
<if test="_environment == 'test'">
TEST.
</if>
<if test="_environment == 'prod'">
PROD.
</if>
MY_TABLE
But this is not working, the result is SELECT MY_TABLE without any if condition.
I need this because I need different prefixes in my statement.
Who can helps me out?