2016-09-02 16:29 GMT+02:00 Adam Gent <[email protected]>: > I sort of mentioned it earlier but wasn't clear. I think you can generate > without the POJOs but you can't generate the POJOs without the Table/Record > classes. I will have to check on this though. >
Oh, interesting, I haven't thought of this. You're right, it's currently not possible to turn off the generation of tables. I've created a feature request for this: https://github.com/jOOQ/jOOQ/issues/5525 Thanks for pointing this out! > The way I think I had tried with the Maven hacks is to run the generator > twice, once in each maven submodule and then using my naming scheme remove > the package named "com.mycompany.db.internal" with the Jar plugin (or maybe > it was the assembly plugin... I can't recall). > Indeed, that would work too, but I can see how this doesn't "look right". > To be clear and honest though I don't think it is worthwhile changing jOOQ > for this behavior. I brought it up as a talking point and to maybe see what > others are doing. > Why not? :) I think you've discovered a flaw, and it's perfectly fine to fix it. Almost everything else can be turned on/off in the code generator... > I think the better solution is for folks to make their own domain objects > by initially opening up the generated POJOs and copying/pasting the > contents to a new class and then using MapStruct to map their POJO to > jOOQ's POJO. MapStruct will even check if you missed fields. > I'd love to hear others' opinion on this, too. > Yeah you have to run code generators but such is the life of Java. > Generated code is highly underrated compared to metaprogramming (ruby) are > extreme type magic (scala). > It's a pragmatic approach to a real-world problem. I've played with type providers. They're dangerous tools and very obscure to debug. Nice when they work, but sometimes, they don't work... Thanks a lot for your feedback! 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.
