How can I tell querydsl-maven-plugin to create NumberPath with Long instead of BigDecimal?

I use querydsl-maven-pluginto export Q paths from an Oracle 11g database. The problem I am facing is that the Oracle fields are NUMBERdisplayed instead of NumberPath<java.math.BigDecimal>insteadNumberPath<Long>

Is there a way that I can give the command querydsl-maven-pluginto translate BigDecimalin Longduring code generation?

The approach I'm using right now is to use the plugin to generate the code, and then translate the types manually.

Any clues would be appreciated.

+5
source share
1 answer

It is currently possible to declare custom user types in the configuration of a querydsl-maven plugin like this

<configuration>
  <customTypes>
    <customType>com.example.NumericLongType</customType>
  </customTypes>
</configuration>

com.example.NumericLongType com.mysema.query.sql.types.Type

-

<configuration>
  <overrides>
    <NUMERIC>java.lang.Long</NUMERIC>
  </overrides>
</configuration>

Querydsl NUMERIC Long .

.

Querydsl https://github.com/mysema/querydsl/issues/273

+2

All Articles