i’m having my first hands on experience with jooqs new multiset feature. There is a product table, each product can be assigned a variable number of storages. Each storage may have a storage_coordinate_instance, whereas a storage_coordinate_instance has a column hierarchy which holds the resolved recurs…
Tag: jooq
Jooq forced type not being applied to column
I’m trying to use jOOQ with a postgres db featuring tsvectors. I added this to my configuration file : I’m trying to apply it to the ts_message_text column : But I get : Answer There should be an additional log message further up: It seems this message isn’t getting printed in jOOQ 3.15.3 in…
JOOQ With Oracle: ORA-00911: invalid character
I am using JOOQ With Oracle 19. In running a Simple query, it is giving invalid character below. Not sure why its creating quotes ‘ either. Java and stack trace SQL below. How can this be fixed for a simple query? It compiles fine however it running produces error. Java: Console Log I copied the SQL que…
JOOQ Setup Oracle with Maven Code Generation
I am trying to setup an Oracle database with JOOQ on Maven for Code Generation. Currently trying to connect with Oracle Database JDBC. https://www.jooq.org/doc/2.6/manual/code-generation/codegen-configuration/ The following example from resource is Postgresql. What is the syntax for Dependencies for Oracle se…
SpringBoot – @Transactional – not opening transaction
I am trying to use transaction in SpringBoot app , for some reason it just doesn’t work. Below is the code for the sample app. I have a rest api in MyRestController.java which invokes DBService.hello() method. In hello() method I insert a row into a table using JOOQ. I see transaction is NOT being creat…
Can jOOQ support composite primary keys if auto-increment field isn’t the first one
I’m using jOOQ (3.14.11) to manage a table defined (in H2 or MYSQL) as: Note that in this SQL, the primary key specifies the (group, pawn) IDs in that order but it is the pawn_id, the second one, which is the auto-increment/identity column. It appears that jOOQ doesn’t like this arrangement. When …
Unable to create records using custom generator strategy for getter names
I’m on jOOQ 3.13.1, dropwizard 2.0.7. To make jOOQ and dropwizard together, I am using (https://droptools.bendb.com/jooq/). I am using custom generation strategy to maintain camel case for my setters and getters. The names are coming in as expected. The record objects have data for their respective colu…
Java JOOQ parse query to ArrayList with object
I have a problem. I am using JOOQ, with that I created the following query: Now I also have the following class: Now I want the result of the query to be parsed to an ArrayList<Candlestick>. I found this page: https://www.jooq.org/doc/3.0/manual/sql-execution/fetching/arrays-maps-and-lists/ that shows h…
jOOQ – DefaultRecordMapper – List
Can the DefaultRecordMapper handle lists? Model example (really getter/setter are used): I first tried it with a simple select: Also I have tried using the nested syntax but it didn’t work: The list never gets initialized. I am unsure if I could be doing something wrong. Is this possible with the Defaul…
Access Kotlin Jooq generated sources in JAVA
I am using Jooq 3.14.7 version to generate Kotlin sources. My code base has both Java and Kotlin class and we are transitioning to Kotlin. I am able to access Jooq sources in Kotlin class like below (FetchBooks.kt) But in Java classes I have to go like this below (FetchBooks.java) This seems a pretty messy wa…