Using Postgres I am able to force TIMESTAMPTZ columns to map to Instant with a forced type in the jOOQ mapping
<code>create table if not exists public.items
(
id varchar(100) not null,
modified timestamptz not null,
name varchar(100) not null,
"sellByDate" date,
quality integer not null
);
</code>
<code>create table if not exists public.items
(
id varchar(100) not null,
modified timestamptz not null,
name varchar(100) not null,
"sellByDate" date,
quality integer not null
);
</code>
create table if not exists public.items
(
id varchar(100) not null,
modified timestamptz not null,
name varchar(100) not null,
"sellByDate" date,
quality integer not null
);
<code>forcedTypes {
forcedType {
name = 'instant'
includeExpression = '.*'
includeTypes = 'TIMESTAMPTZ'
}
}
</code>
<code>forcedTypes {
forcedType {
name = 'instant'
includeExpression = '.*'
includeTypes = 'TIMESTAMPTZ'
}
}
</code>
forcedTypes {
forcedType {
name = 'instant'
includeExpression = '.*'
includeTypes = 'TIMESTAMPTZ'
}
}
When I try to do a similar thing with H2
<code>create table if not exists public.items
(
id varchar(100) not null,
modified timestamp with time zone not null,
name varchar(100) not null,
"sellByDate" date,
quality integer not null
);
</code>
<code>create table if not exists public.items
(
id varchar(100) not null,
modified timestamp with time zone not null,
name varchar(100) not null,
"sellByDate" date,
quality integer not null
);
</code>
create table if not exists public.items
(
id varchar(100) not null,
modified timestamp with time zone not null,
name varchar(100) not null,
"sellByDate" date,
quality integer not null
);
<code>forcedTypes {
forcedType {
name = 'instant'
includeExpression = '.*'
includeTypes = 'TIMESTAMP WITH TIME ZONE'
}
}
</code>
<code>forcedTypes {
forcedType {
name = 'instant'
includeExpression = '.*'
includeTypes = 'TIMESTAMP WITH TIME ZONE'
}
}
</code>
forcedTypes {
forcedType {
name = 'instant'
includeExpression = '.*'
includeTypes = 'TIMESTAMP WITH TIME ZONE'
}
}
The mapping is not applied
<code>WARNING Unused forced types : There are unused forced types, which have not been used by this generation run.
This can be because of misconfigurations, such as, for example:
- case sensitive regular expressions
- regular expressions depending on whitespace (Pattern.COMMENTS is turned on!)
- missing or inadequate object qualification
- the object to which the configuration was applied in the past has been dropped
Try turning on DEBUG logging (-X in Maven, --debug in Gradle, and <logging/> in jOOQ) to get additional info about the schema
16:42:53 WARNING Unused forced type : <priority>0</priority><name>instant</name><autoConverter>true</autoConverter><includeExpression>.*</includeExpression><includeTypes>TIMESTAMP WITH TIME ZONE</includeTypes><nullability>ALL</nullability><objectType>ALL</objectType>
</code>
<code>WARNING Unused forced types : There are unused forced types, which have not been used by this generation run.
This can be because of misconfigurations, such as, for example:
- case sensitive regular expressions
- regular expressions depending on whitespace (Pattern.COMMENTS is turned on!)
- missing or inadequate object qualification
- the object to which the configuration was applied in the past has been dropped
Try turning on DEBUG logging (-X in Maven, --debug in Gradle, and <logging/> in jOOQ) to get additional info about the schema
16:42:53 WARNING Unused forced type : <priority>0</priority><name>instant</name><autoConverter>true</autoConverter><includeExpression>.*</includeExpression><includeTypes>TIMESTAMP WITH TIME ZONE</includeTypes><nullability>ALL</nullability><objectType>ALL</objectType>
</code>
WARNING Unused forced types : There are unused forced types, which have not been used by this generation run.
This can be because of misconfigurations, such as, for example:
- case sensitive regular expressions
- regular expressions depending on whitespace (Pattern.COMMENTS is turned on!)
- missing or inadequate object qualification
- the object to which the configuration was applied in the past has been dropped
Try turning on DEBUG logging (-X in Maven, --debug in Gradle, and <logging/> in jOOQ) to get additional info about the schema
16:42:53 WARNING Unused forced type : <priority>0</priority><name>instant</name><autoConverter>true</autoConverter><includeExpression>.*</includeExpression><includeTypes>TIMESTAMP WITH TIME ZONE</includeTypes><nullability>ALL</nullability><objectType>ALL</objectType>
Can anyone help diagnose the problem please?