I have a custom EnumConverter setup and I want to use it only for a single column in a specific table to generate the POJOs.
<forcedType>
    <name>foo.bar.MyTableStatus</name>
    <expression>mytable.status</expression>
</forcedType>
I've tried several permutations, but the only one I got working was a generic
<forcedType>
    <name>foo.bar.MyTableStatus</name>
    <expression>.*\.status</expression>
</forcedType>
But this converts all status columns in all tables, which is not what I'm looking for.
I've read the docs, the XSD and there's nothing explaining against what regular expression to match. Is it table/column? table.column?
Thanks for any help.
Your original configuration looks almost correct to me:
<expression>mytable.status</expression>
Fully qualified means that the schema is also part of the name, i.e. you should try either of these:
<expression>.*\.mytable\.status</expression>
<expression>myschema\.mytable\.status</expression>
Also, be sure to use the correct casing. Case-insensitive regexes can also be used:
<expression>(?i:.*\.mytable\.status)</expression>
<expression>(?i:myschema\.mytable\.status)</expression>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With