Questions tagged [jooq-codegen-maven]

72 questions
5
votes
1 answer

How to Fetch Multiple Level One to many Nesting with Jooq

Here is the Scenario, I have 5 tables having one to many relations with each other, I have to map result data in hierarchical manner in below given Pojos with Jooq. DB Tables are a, b, c, d, e // Here are response Pojo's Class APojo { public…
Hrishi
  • 446
  • 3
  • 10
4
votes
2 answers

In JOOQ how do we use Java Instant to map to Postgresql's timetamp type?

I was rather surprised to find out that JOOQ (as of 3.16) binds timestamp to LocalDateTime. In my mind timestamp is most naturally mapped to an Instant, it is a Unix epoch timestamp. So how can we get JOOQ to generate code that uses Instant…
benstpierre
  • 32,833
  • 51
  • 177
  • 288
4
votes
1 answer

Jooq XML Database generation

I am manually defining a Database XML schema to use the Jooq capabilities to generate the corresponding code from the definition. I am using Gradle to generate the code with Jooq: jooq { version = '3.13.5' edition =…
Stefano Bossi
  • 1,138
  • 1
  • 9
  • 19
3
votes
1 answer

Selecting identical named columns in jOOQ

Im currently using jOOQ to build my SQL (with code generation via the mvn plugin). Executing the created query is not done by jOOQ though (Using vert.X SqlClient for that). Lets say I want to select all columns of two tables which share some…
Ahmet K
  • 713
  • 18
  • 42
3
votes
1 answer

JOOQ forcedType unable to generate NUMERIC SQL data type via JPADatabase code gen

I am using JPADatabase to generate JOOQ classes from my existing JPA entites. From manual, I know that JPADatabase internally uses H2 database to read the meta data schema and generate the code. Due to H2 database has no data type for Numeric,…
Chris Lee
  • 67
  • 2
2
votes
1 answer

JOOQ failed to generate souces if pojo and DAO was in same package

My pojo(JPA entities) and DAO was in same package, I configured jooq-codegen-maven to generate TableImpl code from JPA entities. and DAO's code uses TableImpl. the strange thing is , when the first time I compile (mvn clean and install), the…
wwc
  • 101
  • 6
2
votes
1 answer

JOOQ H2 (DDLDatabase) code generaton fails because KEY is a reserved word

In newer versions of H2, KEY is a reserved word. JOOQ code generation following this doc fails because we have KEY as column name in some tables: Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL statement "create table if not…
daltonfury42
  • 3,103
  • 2
  • 30
  • 47
2
votes
1 answer

How to use data in *.properties at jooq-codegen-plugin in pom.xml?

I want to use Data in *.properties... This is my application.properties file spring.datasource.url=jdbc:postrgresql://host:port/dbName spring.datasource.username=username spring.datasource.password=password and my "jooq-codegen-plugin" in
2
votes
2 answers

How to translate a MYSQL query to JooQ

I recently started working with JooQ and I want to implement the query below, but I was not able to do this. insert into user_organization_role(id_user, id_organization, id_role,id_workspace) with cte_0 as(select id_user ,…
George Cosmin
  • 101
  • 1
  • 7
2
votes
1 answer

How can I change the Table class names using the by extending jOOQ's DefaultGeneratorStrategy?

I am using the jooq codgen gradle plugin to change the naming convention for generated tables to include Table at the end of the class name. However, I am not sure how to distinguish a table from a schema in the generator. My naming override…
Toaster
  • 1,911
  • 2
  • 23
  • 43
2
votes
1 answer

How to configure jOOQ to generate using javax annotations or something else instead of jakarta annotations?

Just like the title said. Jakarta annotation is not in my classpath so I do not know why jOOQ is generating Java classes with those annotations. I would like to be able to tell it to not use it or rather have a way to specify which validation…
user2798694
  • 1,023
  • 11
  • 26
2
votes
1 answer

Jooq generates classes for tables without fields responsible for columns in tables

For example all generated classes for tables look like that: SuppressWarnings({"all", "unchecked", "rawtypes"}) public class TableName extends TableImpl { private static final long serialVersionUID = 1L; public static…
alf3ratz
  • 21
  • 5
2
votes
1 answer

How do I make JOOQ codegen work with Oracle Edition-Based Redefinition?

I'm working on a project with an Oracle database where we have decided to enable Edition based redefinition. We're also using jooq-codegen for creating Java objects based on objects we have created in the database. I have read through the…
2
votes
0 answers

JOOQ codegen generates different copying constructor if using custom data type converter

I'm using jOOQ 3.15 and faced weird generator behaviour Codegen generates little different copying constructor for Records if you using converter for custom data types. I'm trying to implement org.joda.money.Money integration with our entities Some…
Ilya Vasiuk
  • 49
  • 1
  • 4
2
votes
1 answer

JOOQ not ignoring unknown function despite configuration

I have a jOOQ codegen configuration failing because of a function not known by the framework. The configuration is using the org.jooq.meta.extensions.ddl.DDLDatabase, aiming to generate the code from the Flyway migration scripts. The error is as…
renke
  • 1,180
  • 2
  • 12
  • 27
1
2 3 4 5