Thanks Lukas, it works

On Monday, May 6, 2024 at 2:32:22 PM UTC+2 Lukas Eder wrote:

> Hi Petar,
>
> A DataType<IndexType> instance is available from your SEARCH.EXAMPLE.TYPE 
> column, for example. It might be available elsewhere, too. You can create 
> it as well manually in various ways, e.g. 
> SQLDataType.VARCHAR.asConvertedDataType(...).
>
> I hope this helps,
> Lukas
>
> On Mon, May 6, 2024 at 2:29 PM Petar Andreev <petara...@gmail.com> wrote:
>
>> Hi, I have upgraded to jooq 3.19.8 and I have an enum, e.g.
>> forcedType {
>> userType = 'com.example.IndexType'
>> enumConverter = true
>> includeExpression = '(?i:search\\.example\\.type)'
>> }
>>
>> Then I want to use this enum with DSL.val() in
>>
>> db.select(
>> EXAMPLE.ID,
>> DSL.val(IndexType.SOMETHING))
>> .from(EXAMPLE)
>> ....
>> but the latest jooq gives me an exception:
>> It is strongly recommended not looking up DataType<T> references from 
>> Class<T> references by
>> relying on the internal static type registry. For example, avoid calling 
>> DSL.val(Object) or
>> DSL.val(Object, Class), and call DSL.val(Object, DataType), providing an 
>> explicit DataType
>> reference to jOOQ if your DataType uses a Converter or a Binding. If you 
>> think jOOQ should
>> be able to infer your user type in your particular query, please report a 
>> bug here:
>> https://jooq.org/bug
>>
>> Please help me how shall I use DSL.val with such enums as I don;t know 
>> what DataType I should use. Thanks
>>
>> -- 
>> 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+...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jooq-user/dd0cb81b-f42b-4e37-ad26-0d68a41c5b1dn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jooq-user/dd0cb81b-f42b-4e37-ad26-0d68a41c5b1dn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jooq-user/8279f6d7-3dac-4dd8-b07f-ebfab54baf47n%40googlegroups.com.

Reply via email to