简体   繁体   English

Forcetype表达式不适用于jooq版本3.10

[英]Forcetype Expressions doesn't work for jooq version 3.10

I am using a custom converter and using the following expression in the forceType. 我正在使用自定义转换器,并在forceType中使用以下表达式。 But it looks the the expression doesnt work and the converter doesnt get executed. 但是看起来该表达式不起作用,并且转换器也未执行。

<forcedType>
        <name>UPOrigin</name>
        <expression>up_entries\.origin|up_methods\.origin</expression>
</forcedType>

Any help would be great. 任何帮助都会很棒。

Until version 3.11, you have to either fully qualify your expressions (including schema name) or leave them unqualified. 在版本3.11之前,您必须完全限定表达式(包括模式名称)或使其不限定条件。 I've created a feature request to improve this: https://github.com/jOOQ/jOOQ/issues/7947 我创建了一个功能请求以改善此问题: https : //github.com/jOOQ/jOOQ/issues/7947

In jOOQ 3.11, any of these should work: 在jOOQ 3.11中,以下任何一项都可以工作:

Using an explicit schema name: 使用显式架构名称:

<forcedType>
    <name>UPOrigin</name>
    <expression>my_schema\.(up_entries\.origin|up_methods\.origin)</expression>
</forcedType>

Matching all schemas: 匹配所有模式:

<forcedType>
    <name>UPOrigin</name>
    <expression>.*?\.(up_entries\.origin|up_methods\.origin)</expression>
</forcedType>

Using unqualified column names: 使用不合格的列名:

<forcedType>
    <name>UPOrigin</name>
    <expression>origin</expression>
</forcedType>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM