Sorry. I figured it once I posted. Dumb mistake. I was trying to make it as 
a List<Long> at the beginning and after I realized that Converter requires 
a concrete class (and it's impossible to write something like 
List<Long>.class) I had to "migrate" to arrays.
Thanks for your patience and quick responses!

вторник, 15 сентября 2015 г., 16:19:15 UTC+3 пользователь Lukas Eder 
написал:
>
> Thanks for the update. I understand now. Well, the reason why you get a 
> raw type List, is because you declared it :)
>
> In order to use generics in your custom types, write:
>
> <type>java.util.List&lt;Long></type>
>
> Given that your converter generates arrays, though, you should write
>
> <type>Long[]</type>
>
> As a rule of thumb: The jOOQ code generator just blindly copies your 
> <type/> from the <customType/> declaration to the generated code.
>
> Hope this helps,
> Lukas
>
> 2015-09-15 15:15 GMT+02:00 jdoe <[email protected] <javascript:>>:
>
>> My config's diff:
>> +                            <customTypes>
>> +                                <customType>
>> +                                   
>>  <name>StringFieldsToLongArrayConverter</name>
>> +                                    <type>java.util.List</type>
>> +                                   
>>  <converter>my.package.StringFieldsToLongArrayConverter</converter>
>> +                                </customType>
>> +                            </customTypes>
>> +
>> +                            <forcedTypes>
>> +                                <forcedType>
>> +                                   
>>  <name>StringFieldsToLongArrayConverter</name>
>> +                                   
>>  <expression>my_db\.my_table\.my_field</expression>
>> +                                    <types>.*</types>
>> +                                </forcedType>
>> +                            </forcedTypes>
>>                          </database>
>>
>> My record's diff:
>>   /**
>>   * Getter for <code>my_db.my_table.my_field</code>.
>>   */
>> - public java.lang.String getMyField() {
>> - return (java.lang.String) getValue(5);
>> + public java.util.List getMyField() {
>> + return (java.util.List) getValue(5);
>>   }
>>
>> вторник, 15 сентября 2015 г., 15:58:21 UTC+3 пользователь Lukas Eder 
>> написал:
>>>
>>> I'm sorry, I'm not quite sure what you mean by this:
>>>
>>> 2015-09-15 12:05 GMT+02:00 jdoe <[email protected]>: 
>>>>
>>>> and got my configured field as of type List (raw!!!). Why is that and 
>>>> where's my type information?
>>>>
>>>
>>> Could you post the code that contains this raw type List? And what's 
>>> also useful: What is your code generation configuration?
>>>
>>> Best Regards,
>>> 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] <javascript:>.
>> 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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to