I'm sorry, I must have misunderstood you, then.

We have the capability of renaming schema names and table names in the code
generator:
http://www.jooq.org/doc/latest/manual/code-generation/schema-mapping

But it isn't the same as what the matcher strategy implements, it's much
less powerful. The idea behind this is to be able to implement
multi-tenancy in the code generator.

This currently also doesn't work for columns:
https://github.com/jOOQ/jOOQ/issues/2949

Or with regexes:
https://github.com/jOOQ/jOOQ/issues/2928

I'm just wondering - if we should in fact deprecate this schema mapping
functionality and merge it into the generator strategies...
https://github.com/jOOQ/jOOQ/issues/3785

In any case, no, the feature you're looking for is not yet implemented. The
only thing you could do is re-implement the MySQLDatabase to produce the
column names from the information_schema the way you want them to be...

However, why does jOOQ generate "ID" for you in the first place? We're not
aware of any such bugs. If you generate code with lower-case `id` columns,
they will be using a lower-case "id" column name reference...

2014-11-20 20:41 GMT+01:00 <[email protected]>:

> Hmm.. I've tried this, but did not get it to work. Maybe I need to look
> closer :D
>
> Just to be clear. I'm not talking about the java code. Love all the
> choices there. I'm talking about the reference to the column in the
> database, the one in quotes ("columnName")
> So all the method and class names are ok, but talking to the database is
> in the wrong case
>
> Thanks
>
> kl. 15:02:38 UTC+1 onsdag 12. november 2014 skrev Lukas Eder følgende:
>>
>> 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.
>

-- 
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