AWESOME!!!!! Thanks again Lukas.

On Thursday, December 27, 2018 at 4:00:38 AM UTC-5, Lukas Eder wrote:
>
> Hi Max,
>
> The DefaultRecordMapper supports mapping things into a pre-existing 
> instance, so you can use it in two ways:
>
> - By specifying the Class<E> reference, in case of which you currently 
> cannot hook into the instantiation of that class
> - By specifying <E> instance directly, in case of which you're in control 
> of that
>
> So, just write 
>
>    .fetchInto(r -> r.into(new MyRow(helper)));
>
> See:
> - https://www.jooq.org/javadoc/latest/org/jooq/Record.html#into-E-
> - 
> https://www.jooq.org/javadoc/latest/org/jooq/impl/DefaultRecordMapper.html
>
> I hope this helps
> Lukas
>
> On Mon, Dec 24, 2018 at 5:28 AM Max Kremer <mkr...@trialfire.com 
> <javascript:>> wrote:
>
>> Hi,
>>
>>   Consider the following typical query execution. I am populating a JPA 
>> annotated POJO called MyRow
>>    
>>                d.select( ..)
>>                 .from(  ... ).as("S")
>>                 .where( ... )
>>                 .groupBy(groupByFields)
>>                 .fetchInto(MyRow.class);
>>
>> What I need to do is pass additional information to the MyRow 
>> constructor. How can this be achieved?
>>
>> For example let's say I have a class called *MyRowParserHelper* that is 
>> used by the *MyRow* class. I need to pass an instance of the  
>> *MyRowParserHelper*
>> (it can be the same instance) to each instance of the *MyRow* class 
>> created by the *fetchInto* method. Is this possible?
>>
>> -- 
>> 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 <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 jooq-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to