-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generator produces an invalid enum with an underscore "_" as the name #10866
Comments
Thanks for your report. As a workaround, you can always implement a generator strategy to assign different identifiers to your enums: https://www.jooq.org/doc/latest/manual/code-generation/codegen-generatorstrategy/ |
This seems to be an oversight in the fix for #4703. |
Hmm, no. Unfortunately, generator strategies aren't involved in generating the identifiers for enum literals. That might be another issue: #10881 Your examples show an interesting case. While it would be possible to disambiguate the enum ('', '-') I don't want to rush fixing this. It seems that name disambiguation could use some more thorough thought... |
Another workaround is to use a |
Same Problem here: MySQL, Enum Type: This is a very bad problem, as this is no more supported in JDK > 9. Warning in JDK 8: As this is a "does not compile" error, is it possible to put the priority a little bit higher than medium? |
Starting from jOOQ 3.16, such problems can be worked around using a We should obviously never generate |
I'm fixing this particular issue here, where There's still more name mangling to be done, but it might be more edge-casey than this one (?): #12732 Again, at least with 3.16, the |
Fixed in jOOQ 3.16. I won't backport this fix, because it could break existing generated code elsewhere. |
Using the 3.14.1 code generator with Java on a MySQL database with an enum field defined as:
OR
produce an invalid underscore "_" enum:
expected: Have some placeholder or random name.
The text was updated successfully, but these errors were encountered: