Hi Jens,

Hmm, are you sure you called name()? Because that method is a final method
in any enum. Do note that jOOQ also generates a getName() method, which
returns the enum type name...

Hope this helps,
Lukas

2016-10-17 15:36 GMT+02:00 <jens.klingsp...@gmail.com>:

> When creating an enum in Java you can usually call it's name()-method to
> get the String-representation of that enum, e.g. calling MyEnum.TEST.name()
> would return the String "TEST". When generating enums with jOOQ however the
> name()-method would return something like "my_enum" (at least for version
> 3.8 using a MySQL dialect). The javadoc of the interface EnumType states in
> addition for the name()-method "The type name as registered in the
> database, if applicable (Postgres-scope enum type only). Otherwise, this
> returns <code>null</code>"? Is there a way to make the name()-method return
> the String-representation of the enum? As a workaround I can use the
> toString()-method, however this is not possible when working together with
> 3rd party libraries.
>
> --
> 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 jooq-user+unsubscr...@googlegroups.com.
> 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 jooq-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to