Thanks for reporting!

2014-09-03 18:42 GMT+02:00 Prem Nair <[email protected]>:

> Thanks Lukas. Worked like a charm!. Appreciate it...!
>
>
> On Wednesday, 3 September 2014 21:37:15 UTC+5:30, Lukas Eder wrote:
>
>> Hello,
>>
>> There are two things to say here.
>>
>> 1. Nice idea! Even if Field.in(Result<? extends Record>) is currently not
>> supported, I think we should add such a convenience overload for in() and
>> notIn() and possibly other methods. I have added: https://github.com/
>> jOOQ/jOOQ/issues/3622
>>
>> 2. Unfortunately, because of generic type erasure, we cannot overload
>> Field.in(Collection<T>) with Field.in(Collection<? extends Field<T>>). This
>> is why we only have a less type safe Field.in(Collection<?>): http:
>> //www.jooq.org/javadoc/latest/org/jooq/Field.html#in-java.
>> util.Collection-. Result is a List, which extends Collection, and thus
>> the compiler will accept Result as an argument to Field.in(Collection<?>),
>> even if it is not supported. What you want to do can be achieved like this:
>>
>> where(Table2.Col2.in(Col1Vals.getValues(0)))
>>
>>
>> Hope this helps,
>> Lukas
>>
>> 2014-09-03 17:38 GMT+02:00 <[email protected]>:
>>
>>> Hello
>>> I have a query which could give multiple values of a single col of long
>>> type (BIGINT). I would like to Resulting value which will be one or more
>>> longs as is in a .in condition as given below. The JOOQ snippet is as given
>>> below, but the second query results in zero results. First query is
>>> returning proper values.
>>>
>>>
>>> Result<Record1<Long>> *Col1Vals* = jooq.select(Table1.Col1).from(
>>> Table1).where(criteria).fetch();
>>>
>>>  if(storeIDs.isNotEmpty())
>>>  {
>>>        ResultSet details = jooq.select().from(Table2).where(
>>> Table2.Col2.in(*Col1Vals*)).fetch().intoResultSet();
>>>  }
>>>
>>> Any thoughts ?
>>> Thanks
>>> Prem
>>>
>>>  --
>>> 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.
>>>
>>
>>  --
> 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.
>

-- 
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