Hi Garret, 2014-04-28 0:48 GMT+02:00 Garret Wilson <[email protected]>:
> We have column names like "foo:bar" > > I accidentally used jOOQ 3.1.0 to generate class names. I created a new > ExampleRecord and called exampleRecord.Foo_bar() to set the "foo:bar" > column. OK, that looks reasonable. > > Then I tried to compile and ran into the problems that > arise<https://groups.google.com/d/msg/jooq-user/mmwfznnCdJ0/QTs3z-6XSaYJ>when > mixing version numbers. So I updated the code generator to version > 3.3.1 to match the library used in my code. > > Now instead of exampleRecord.Foo_bar() I have to use > exampleRecord.Foo_3abar(). (groan) > > The source of the bug is easy to guess: somewhere the generator is > URI-encoding encoding the column names (but why!??) > This is the general name mangling strategy to avoid conflicts when someone has all of foo:bar, foo_bar, and foo?bar columns. This was implemented in jOOQ 3.3.0: https://github.com/jOOQ/jOOQ/issues/2016 > yielding "foo%3abar", so that when they get "cleaned up" and camelCased > for Java this gets turned into "foo_3abar". > > Ugh, this is just ugly. Could we get a patch release quickly that fixes > this bug? > At Data Geekery, we're more than happy to offer you custom engineering services for urgent tasks. Please find some information on this website: http://www.jooq.org/support ... or contact [email protected]. Apart from the features that are already in place to work around such issues (see below), I'm sure we can find an agreement quickly. > Otherwise we're going to have to have tons and tons of code that looks > terrible, which will have to be updated when the bug is fixed. > You can work around this issue by explicitly renaming generated objects using matcher strategies: http://www.jooq.org/doc/latest/manual/code-generation/codegen-matcherstrategy/ Or your own programmatic strategies: http://www.jooq.org/doc/latest/manual/code-generation/codegen-generatorstrategy/ > (I'm just now going through and changing all my colleagues' JDBC code to > jOOQ; this isn't going to help it sell well on my team.) > I'm aware that you've used the term "show-stopper" before for something that might have not appeared like a critical issue in ordinary contexts. I personally believe that this name-mangling scheme isn't such a critical issue. Maybe, you have more general concerns or doubts towards jOOQ, that you would like to address? I would like to offer help with any substantial issues you may have. Best Regards, 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
