I guess if you add all the _simple_ features in a "SimpleNamingStrategy" (having "Simple" in the name will be important *lol* ) it will be obvious to people that it will cover only the most basic use cases and you will not raise a maintenance nightmare :-)
This should satisfy 98% of all jOOQ users with very little work required. What you think? Am Dienstag, 8. Januar 2013 12:21:00 UTC+1 schrieb Lukas Eder: > > Hi Peter, > > > Altering the naming in case of using the maven plugin is a little > cumbersome > > since you need to define the custom naming scheme in an additional, > external > > dependency / module. Having the naming scheme in the same module as the > > generator plugin will not work since the generator will execute _before_ > > maven starts compiling the java files. > > I'm aware of this issue. I had asked a Stack Overflow question to get > some input on the matter, some time ago: > http://stackoverflow.com/q/10322155/521799 > > However, that's how Maven works. I guess, one can get used to it... > > > I think the usecase of adding a prefix to the class is name is so useful > > that I suggest adding something like 'PrefixNamingGenerator' in > jooq-util. > > Especially when running side-by-side with JPA or Hibernate since > entities > > usually have the same names as the jOOQ classes which is very > > inconvenient.This would be similar to querydsl settings > 'querydsl.prefix' > > ( > http://www.querydsl.com/static/querydsl/2.2.0/reference/html/ch03s02.html) > > > which by default uses prefix 'Q'. > > Yes, this has been requested before: > https://github.com/jOOQ/jOOQ/issues/408 > https://github.com/jOOQ/jOOQ/issues/830 > https://github.com/jOOQ/jOOQ/issues/1126 > https://github.com/jOOQ/jOOQ/issues/1171 > https://groups.google.com/forum/#!msg/jooq-user/o_eN0g6XjyM/EGFHy6DMpy4J > > As you can see in #408 and #1126, users tend not to stop at wanting > prefixes. At some point, they will want suffixes, and then both, and > then CamelCasing vs. UNDERSCORE_NOTATION. And then, they will want > different prefixes for tables and for records, but no prefixes for > table references... :-) > > NamingStrategy already covers all that with no additional maintenance > effort for me :-) At some point, I will implement #1171, which is > probably the most generic way to handle this seemingly simple feature > request of adding prefixes (and then suffixes and then renaming and > then...). In fact, it is an XML-based way to configure a Java > NamingStrategy implementation. > > > Marking all jOOQ classes with an capital 'J' would be cool for me and I > > could easily lookup jOOQ classes by typing 'J' in the type search of > IDEA or > > eclipse :-) > > Yes, I can see the usefulness of that. >
