What you're looking for is what we call "generator strategy"

-
http://www.jooq.org/doc/latest/manual/code-generation/codegen-generatorstrategy/
-
http://www.jooq.org/doc/latest/manual/code-generation/codegen-matcherstrategy/

With the matcher strategy, it will be particularly easy, as we have
pre-defined "transformers" for UPPER_CASE, lower_case, camelCase,
PascalCase, and "AS_IS"

For the record: We chose UPPER case only for historic reasons, as we have a
certain affinity and background with Oracle, which reports case-insensitive
names in upper case. In a future version, we'll default the code generator
to generate all object names as they are reported by the database.

2014-11-12 14:03 GMT+01:00 <[email protected]>:

> I am generating code from MySQL with lower case names on everything. The
> server is set up as being case sensitive, which creates problems when doing
> queries against the db.
>
> Jooq generates Java classes where the table and column names are generated
> in UPPER case.
> I mean, and suggest, that it should be possible to set properties for the
> code generator which allows you to GENERATE code much like the
> RenderNameStyle does the other way.
> I can use RenderNameStyle on the DSL to create my queries in lower, but I
> don't feel this is the way to go as the table classes are incorrect
> compared to the db
>
> Example:
>
> Table in DB
> CREATE TABLE `test` (
>   `id` integer NOT NULL ......);
>
> Generated code:
> public final org.jooq.TableField<.**.core.jooq.tables.records.TestRecord,
> java.lang.Integer> ID = createField("ID",
> org.jooq.impl.SQLDataType.INTEGER.nullable(false).defaulted(true), this,
> "");
>
> What I would like is that the createField("id", ... can have the same case
> as the db.
> I love that the variable ID is upper as it is final. But I would like the
> column reference to be the correct case
>
> Same with table names aso.
>
> IN SHORT:
> I would like a similar approach as RenderNameStyle during code generation,
> GenerateNameStyle?, which allows me to have the correct case in references
> to db
>
> --
> 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 [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to