Hi Lukas,

Thank you for your swift reply (again), always a pleasure.
I just now found time to follow up on your reply, and indeed, when I return 
an empty result with the proper columns, it all works fine.

Thanks & enjoy the holidays!
Paul

On Friday, December 22, 2017 at 11:07:00 AM UTC+1, Lukas Eder wrote:
>
> Thanks for your message. This is due to the following incompatible change 
> in jOOQ 3.10:
> https://github.com/jOOQ/jOOQ/issues/5818
>
> The change in the behaviour of the fetch() method also affected the 
> behaviour of the MockDataProvider. We've already improved the documentation 
> to reflect that:
> https://github.com/jOOQ/jOOQ/issues/6774
> https://github.com/jOOQ/jOOQ/issues/6923
>
> There is also a discussion here, which I recommend reading:
> https://github.com/jOOQ/jOOQ/issues/6907
>
> Essentially, there has been a misunderstanding around the design of 
> MockResult(0, null), in particular the null part. In SQL, in JDBC, and in 
> jOOQ, there are no ResultSets with no columns / unknown columns. So, if you 
> pass a "null" Result to the MockResult, the only reasonable meaning is that 
> there are no results at all (not even an empty result). That's the way 
> MockResult was designed before, and your tests were already wrong before 
> (but may have accidentally passed).
>
> jOOQ 3.10 (with #5818) now changes in a way that when you fetch a result 
> from what does not return a result, you're getting an 1x1 result containing 
> update count - 0 in your case.
>
> If you want to create a MockResult for the query 
> selecting MPS_PEOPLE.FIRST_NAME, then you should create an empty result 
> containing exactly that column and return that.
>
> Again, a more detailed discussion is available in
> https://github.com/jOOQ/jOOQ/issues/6907
>
> I hope this helps,
> Lukas
>
> 2017-12-22 9:26 GMT+01:00 Paul Hamer <[email protected] <javascript:>>:
>
>> Forgot to mention that, obviously, I've had jOOQ regenerate all sources 
>> after switching between the two jOOQ versions.
>>
>> -- 
>> 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