Digest for jooq-user@googlegroups.com - 5 updates in 3 topics

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Digest for jooq-user@googlegroups.com - 5 updates in 3 topics

http://groups.google.com/group/jooq-user/topics mailing list
Nicola Micheli <[hidden email]>: Aug 26 05:42AM -0700

I use jooqversion 3.11.7 and it works fine with version 3.11.12 I have this
error
 
java.lang.NoSuchMethodError:
org.jooq.impl.Internal.createParameter(Ljava/lang/String;Lorg/jooq/DataType;ZZ)Lorg/jooq/Parameter;
Lukas Eder <[hidden email]>: Aug 26 09:43AM +0200

Thank you very much for your message. Unfortunately, this is not yet
supported in jOOQ. We have a feature request to improve this:
https://github.com/jOOQ/jOOQ/issues/5961
 
As a workaround, you could write your own RecordMapper (possibly extending
upon DefaultRecordMapper) and hook it into your Configuration using a
RecordMapperProvider:
https://www.jooq.org/doc/latest/manual/sql-execution/fetching/pojos-with-recordmapper-provider/
 
Alternatively, instead of using JPA annotations (I'm not sure if that is
actually idiomatic JPA usage), you could alias your projected columns to
TABLE_A.NAME.as("name_a") or TABLE_A.NAME.as("nameA") to get the wanted
behaviour.
 
I hope this helps
Lukas
 
Lukas Eder <[hidden email]>: Aug 26 02:14AM -0700

For the record, this question has also been asked here:
https://stackoverflow.com/q/57654944/521799
 
On Monday, August 26, 2019 at 9:43:56 AM UTC+2, Lukas Eder wrote:
[hidden email]: Aug 26 02:41AM -0700

Thanks Lukas,
 
I have read the contents of issues/5961, but it seems has a lower priority
to support.
But I think it would be better to implements this, since it may be a common
solution
to resolve duplicate name problems in Jooq.
 
I cannot use column alias to implement this, since I need a dynamic query
not a static one.
I will try to write a custom RecordMapper to implement this.
 
Thank you.
Extjs
 
 
On Monday, August 26, 2019 at 6:14:52 PM UTC+9, Lukas Eder wrote:
Lukas Eder <[hidden email]>: Aug 26 10:13AM +0200

Hi Deba,
 
The "Invalid SQL: " message happens because MockFileDatabase does not find
any matching SQL statement in your file that would match the one you ran.
The SQL string that you (via jOOQ) sent to the MockFileDatabase is printed
there, now you will have to check your file for the statement you intended
to match here.
 
In your file, you used inline values / constant
literals: cast('{"efb2d576-f2d3-4a8e-9715-dc95fdd14701","816d681e-18ca-4b61-938c-401b22c714f5"}'
as uuid[])
 
... but what's being sent to the server is a bind variable
placeholder: ?::uuid[]
 
I have created a feature request to improve this error message and explain
the possible mistakes that could have happened:
https://github.com/jOOQ/jOOQ/issues/9078
 
I hope this helps,
Lukas
 
On Fri, Aug 23, 2019 at 3:24 PM Debapriya Patra <[hidden email]>
wrote:
 
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to [hidden email].