Convert Hibernate @Formula to JOOQ field

前端 未结 1 1310
孤街浪徒
孤街浪徒 2021-01-24 10:05

I am rewriting entire DB access layer from Hibernate to JOOQ and I face following issue.

One of JPA models is annotated with @Formula annotation as follows:

<         


        
相关标签:
1条回答
  • 2021-01-24 10:20

    I managed to resolve the issue with following JOOQ query:

    BigDecimal input = ...;
    Field<BigDecimal> fee5 = TABLE.FEE1.add(TABLE.FEE2).add(TABLE.FEE3).add(TABLE.FEE4).as("fee5");
    Condition cond = fee5.greaterThan(input);
    
    0 讨论(0)
提交回复
热议问题