Q: jOOQ does not support a vendor-specific function. Can I still use this function?
Yes, whenever something isn't supported out-of-the-box in jOOQ, you can use plain SQL templating
to make it work.
Q: How do I create a constant value in a SQL query?
Constants are just ordinary
expressions. Use bind values or inline values
Q: How do I turn a
Field<Boolean> into a
One can be wrapped by the other, see boolean columns
Q: Why am I getting a connection leak?
If you pass jOOQ a JDBC
, jOOQ will never close it for you. Instead, try passing jOOQ a
, and jOOQ will manage the connection lifecycle for you
Q: How can I change the qualification of tables and columns in jOOQ generated SQL (e.g. for multi tenancy)?
By default, jOOQ fully qualifies all identifiers of tables, columns, and other objects. However, using the runtime schema mapping
feature, you can change these qualifications at runtime, configuratively.
Q: I don't want to connect to a live database for code generation. Can I do it?
Yes, we currently support generating code from XML
, JPA entities
, and SQL scripts
, without requiring a live connection.
Q: Do I have to use the code generator?
While we recommend using it, you don't have to. You can create queries from identifiers only
Q: Where to put generated code?
There is no correct answer to this question, but there are some opinions
Q: Why are no classes being generated?
and many other configuration elements are case sensitive. Please check you're using the right case.
Your database user needs appropriate privileges to query the dictionary views / information schema.
Q: I'm getting
A very likely reason for this is that you're using different jOOQ versions in your code generator and at runtime. This can happen if you're using third party dependency management, such as Spring Boot
, or the third party jOOQ gradle plugin
. Make sure you're using the same jOOQ version (and edition!) for everything.