Re: How to execute queries with more parameters than allowed by the database

2017-03-08 Thread Marcus Gattinger
Lukas, we are using jTDS for historical reasons. The development of our software product goes back to 2010. On those days the JDBC driver from Microsoft wasn't as fast as nowadays and significantly slower than the jTDS driver (some rough testing seems to prove that jTDS is still a bit faster).

Re: How to execute queries with more parameters than allowed by the database

2017-03-08 Thread Marcus Gattinger
However, using the StatementType.STATIC_STATEMENT approach works fine. -- You received this message because you are subscribed to the Google Groups "jOOQ User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: How to execute queries with more parameters than allowed by the database

2017-03-08 Thread Marcus Gattinger
Hi Lukas, thank you very much for the quick and very informational response. Actually this is just a sample. In the real application, this list of ids is the result of multiple queries that select them iteratively. After all ids have been identified, the corresponding objects are selected. The

Generating same catalog and schema classes for different database types

2017-03-10 Thread Marcus Gattinger
Hi, out software product targets different DBMS (e. g. SQL Server and MySQL), hence I'm facing the problem that some DBMS support schemas (like SQL Server) and others (MySQL) don't. So my goal is to let jOOQ generate identical classes for the catalog and the schema implementation despite of

How to commit only if outmost transaction is committed?

2017-06-08 Thread Marcus Gattinger
Hi user group, I'm evaluating jOOQ now for a while and struggle about transaction handling. Currently we use Hibernate in our software and the transaction handling works like this: We have a Service that is used to begin and commit/rollback a new transaction, but only if no transaction has

Re: How to commit only if outmost transaction is committed?

2017-06-08 Thread Marcus Gattinger
within the save() methods of other repositories. Am Donnerstag, 8. Juni 2017 11:40:17 UTC+2 schrieb Marcus Gattinger: > > Hi user group, > > I'm evaluating jOOQ now for a while and struggle about transaction > handling. > > Currently we use Hibernate in our software and the

Re: How to commit only if outmost transaction is committed?

2017-06-08 Thread Marcus Gattinger
Another question related to correct transaction handling: Does DSL.using(DEFAULT_ CONFIGURATION) always return the same JDBC connection that is used by jOOQ to query the database? Otherwise transaction isolation comes into play, so e. g. new inserted but not yet committed rows are not visible

Re: How to commit only if outmost transaction is committed?

2017-06-16 Thread Marcus Gattinger
I see. Thank you very much for your help, Lukas, and sorry for my delayed response. Although I haven't planned to use Spring for the transaction management, I have tried it and as far as I can see it works very well with jOOQ. -- You received this message because you are subscribed to the

Re: Customize rendering while logging executing query

2018-02-22 Thread Marcus Gattinger
est/manual/sql-building/dsl-context/custom-settings/settings-execute-logging > [5] https://www.jooq.org/doc/latest/manual/sql-execution/execute-listeners > > 2018-02-22 12:28 GMT+01:00 Marcus Gattinger <gatt...@gmx.de > > : > >> Hi, >> >> is there any possi

Customize rendering while logging executing query

2018-02-22 Thread Marcus Gattinger
Hi, is there any possibility to customize the format of the logged executing query? For example assume the following default logging: Execute query: select `test`.`table`.`id` from `test`.`table` where `test`.`table`.`fk_sid` = 43 I want to make the logging more concise by omitting

Re: How to prevent addtional SELECT after INSERT to retrieve auto-assigned value of primary key with AUTO_INCREMENT (MySQL)?

2018-09-05 Thread Marcus Gattinger
Hi Lukas, no, none of the conditions are met. I paste the full sample code including the table definition so that you can reproduce the behaviour on yourself. /* CREATE TABLE `test` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(50) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY

How to prevent addtional SELECT after INSERT to retrieve auto-assigned value of primary key with AUTO_INCREMENT (MySQL)?

2018-08-30 Thread Marcus Gattinger
Hi Lukas, I currently compare jOOQ and Hibernate in terms of rendered and executed statements. For my tests I use MySQL and for the low level profiling I use the tool "Neor Profile SQL". Inserting new rows to a table with a primary key declared as AUTO_INCREMENT shows me that jOOQ renders and

Re: How to prevent addtional SELECT after INSERT to retrieve auto-assigned value of primary key with AUTO_INCREMENT (MySQL)?

2018-08-31 Thread Marcus Gattinger
.getTable()) > .set(record) > .onDuplicateKeyUpdate() > .set(record) > .returning(record.field1()) > .fetchOne(); > long id = result.getId(); > > > On Thu, Aug 30, 2018 at 5:12 AM Marcus Gattinger >

Re: How to prevent addtional SELECT after INSERT to retrieve auto-assigned value of primary key with AUTO_INCREMENT (MySQL)?

2018-08-31 Thread Marcus Gattinger
Yes, in my original post I use the record constructor, too. It does not make any difference whether I attach the Record instance to the context right before the record is saved or if I create the record using database().newRecord(CLIENT). -- You received this message because you are

Create H2 database using already generated jOOQ classes

2018-09-07 Thread Marcus Gattinger
Hi! Using jOOQ's code generator allows me to create all necessary classes from an existing database schema. I wonder if the opposite is possible, too? So does jOOQ provide a possibility to create a database (in particular an in-memory database like H2) based on the already available generated

Re: How to prevent addtional SELECT after INSERT to retrieve auto-assigned value of primary key with AUTO_INCREMENT (MySQL)?

2018-09-05 Thread Marcus Gattinger
BTW: The default value of setting ReturnAllOnUpdatableRecord is false as I confirmed by replacing the line of code with System.out.println(database.settings()). -- You received this message because you are subscribed to the Google Groups "jOOQ User Group" group. To unsubscribe from this group

Re: Deprecation of enumeration org.jooq.Clause / looking for alternative approach

2018-07-05 Thread Marcus Gattinger
is part of a web application). But to be honest, there might be always some scenarios that will lead other application parts to work with stale data. For now the cache invalidator does a good job for us :) Regards, Marcus Am Freitag, 29. Juni 2018 12:21:20 UTC+2 schrieb Marcus Gattinger

Deprecation of enumeration org.jooq.Clause / looking for alternative approach

2018-06-29 Thread Marcus Gattinger
Hi Lukas, I have seen, that the enumeration org.jooq.Clause has been marked for deprecation. I use this enumeration as part of an automatic cache invalidation that I've been written. The cache I've build caches entity instances based of their class and id (primary key). Think of a map like

Re: How to prevent addtional SELECT after INSERT to retrieve auto-assigned value of primary key with AUTO_INCREMENT (MySQL)?

2018-10-16 Thread Marcus Gattinger
Thank you very much, Lukas! -- You received this message because you are subscribed to the Google Groups "jOOQ User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+unsubscr...@googlegroups.com. For more options, visit

Re: How to prevent addtional SELECT after INSERT to retrieve auto-assigned value of primary key with AUTO_INCREMENT (MySQL)?

2018-10-15 Thread Marcus Gattinger
Hi Lukas, have you had the chance to figure out, what the problem with the additional select was? Do you have any update for me? Kind regards, Marcus -- You received this message because you are subscribed to the Google Groups "jOOQ User Group" group. To unsubscribe from this group and stop

Re: How to prevent addtional SELECT after INSERT to retrieve auto-assigned value of primary key with AUTO_INCREMENT (MySQL)?

2018-08-30 Thread Marcus Gattinger
BTW: Im using Record.store() to insert new rows to the table. -- You received this message because you are subscribed to the Google Groups "jOOQ User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+unsubscr...@googlegroups.com. For

Re: Create H2 database using already generated jOOQ classes

2018-09-14 Thread Marcus Gattinger
Exactly what I needed. Thank you, Lukas. -- You received this message because you are subscribed to the Google Groups "jOOQ User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+unsubscr...@googlegroups.com. For more options, visit