Hi Carsten, That's not a glitch :) Think about it: What would happen if jOOQ generated "public" as a package name? The same thing would happen, by the way, if you had a schema called "if" or "for" or "switch" or "break" or "class"...
jOOQ escapes all sorts of naming collisions, keywords, and other things that are not allowed in the Java language by appending an underscore. If you want fine-grained control over these things (e.g. to name the package PUBLIC (with upper case letters)), you can use a generator strategy: - Programmatic: http://www.jooq.org/doc/latest/manual/code-generation/codegen-generatorstrategy - Configurative: http://www.jooq.org/doc/latest/manual/code-generation/codegen-matcherstrategy Hope this helps, Lukas 2016-07-14 13:45 GMT+02:00 Carsten Langsdorf <[email protected]>: > Hi everybody, > > I just joined, and although I don't know if I can contribute more than the > occasional silly question, I will try ;) > > (yeah I know, there is no try, only do or not do ;) > > So here's my current question: > > I'm working on a program that uses H2, and I use Intellij IDEA. The > database design is pretty stable for now, and I want to use jOOQ's code > generation to generate classes right into my IDEA project. I have managed > so far, although I'm fairly new to jOOQ. There is one funny thing though. > My H2 database uses multiple schemas, and oddly enough the PUBLIC schema > comes up as > > public_ > > after code generation. i.e. as package/directory in IDEA as well as part > of the package declaration in the generated classes. > > Although it doesn't seem to be a major issue, it's bothering. I already > tried to get around it by using a <schema> section in the XML file that I > use for generation: > > <schema> > <inputSchema>PUBLIC</inputSchema> > <outputSchema>public</outputSchema> > <outputSchemaToDefault>false</outputSchemaToDefault> > </schema> > > Oddly enough, the schema isn't even recognised/processed if I don't > specify it in caps as input schema. > > However, even the code above causes the PUBLIC schema to appear as > > public_ > > after generation. > > Things that make you go 'hmmmm'. > > Any ideas, anyone? > > -- > 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.
