generate is stuttering

35 views
Skip to first unread message

Rob Sargent

unread,
Nov 26, 2020, 8:59:21 PM11/26/20
to jOOQ User Group
java 11
jooq 3.13.6
postgres 12

Setters and getters are being create twice for returned columns of one postgres function.  The first of a pair of setters calls "set(N, value)" and the second calls set(N+1, value).  Similarly for the getters.

I have forked the mcve, cloned, tweaked the pom[1] and mvn clean verify generates the same duplication I'm seeing in my working environment.
But of course this is dependent on my database and the function in question.  Do I check-in a dump file (90K)?

Here's what I know:
There are many public functions but it appears this is the only one which causes this behaviour.

This is in fact an overloaded function (same name, different args, same return structure).  
In ".../public_/tables" directory, there is only one definition of the function generated and the "Call this table-value function" uses the shorter list of args (text,text args v. text,text,double,int).  This version of the function simply adds the two values (defaults) and calls the four-arg version. Each column definition (TableField<MyRecord>, Class) is duplicated and this is where we go afoul of the compiler.

The constructors in the generated Record (".../public_/tables/records") has each of the three returned column duplicated.

Would it suffice to check-in just the definition of the functions (sql)? And the generated, non-compiling java files?



Lukas Eder

unread,
Nov 27, 2020, 3:07:35 AM11/27/20
to jOOQ User Group
Hi Rob,

Thanks for your message. Have you verified this behaviour with jOOQ 3.14.4? If it still persists, yes please check in whatever is needed to reproduce the problem. You can check in the 90k dump file, or if that contains sensitive information, try to remove things until you find a minimal set to help reproduce the problem (the 90k are probably not necessary).

Before you do that, please check if this isn't just this issue here:

Thanks,
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 jooq-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jooq-user/6601a73b-3a14-4239-b098-a0f6a54fc381n%40googlegroups.com.

Rob Sargent

unread,
Nov 27, 2020, 10:03:29 AM11/27/20
to jOOQ User Group
OK, old news. And in 3.14.3 as well (but you expected that, I believe). I can rework the function definition. 

I see I didn't fill in my "pom[1]" footnote originally. Is line 6 of the pom.xml correct? I think it's a little early to reference "${org.jooq.groupId}" 
 --- a/pom.xml 
+++ b/pom.xml 
 @@ -3,7 +3,7 @@ 
<modelVerions>4.0.0</modelVersion> 

 - ${org.jooq.groupId} 
 + org.jooq

Lukas Eder

unread,
Nov 27, 2020, 10:13:07 AM11/27/20
to jOOQ User Group
On Fri, Nov 27, 2020 at 4:03 PM Rob Sargent <robjs...@gmail.com> wrote:
OK, old news. And in 3.14.3 as well (but you expected that, I believe). I can rework the function definition. 

I'm not sure what you mean. There have been hundreds of closed issues in version 3.14, not all of which backported to 3.13. It's always worth checking if a bug persists with the latest published version...
 
I see I didn't fill in my "pom[1]" footnote originally. Is line 6 of the pom.xml correct? I think it's a little early to reference "${org.jooq.groupId}" 
 --- a/pom.xml 
+++ b/pom.xml 
 @@ -3,7 +3,7 @@ 
<modelVerions>4.0.0</modelVersion> 

 - ${org.jooq.groupId} 
 + org.jooq

I'm not sure what this is about?

Rob Sargent

unread,
Nov 27, 2020, 12:06:20 PM11/27/20
to jooq...@googlegroups.com
That’s diff(a la emacs) of the original pom.xml with my version. 
I question line six of the pom, but I’m not a maven user these days. 

And, to main point, overloaded table returning functions still duplicate columns

On Nov 27, 2020, at 8:13 AM, Lukas Eder <lukas...@gmail.com> wrote:


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

Lukas Eder

unread,
Nov 27, 2020, 12:36:00 PM11/27/20
to jooq...@googlegroups.com
Rob, I know it's a diff but what are you trying to tell me? Is it related to this code generation issue?


Am Freitag, 27. November 2020 schrieb Rob Sargent <robjs...@gmail.com>:
That’s diff(a la emacs) of the original pom.xml with my version. 
I question line six of the pom, but I’m not a maven user these days. 

And, to main point, overloaded table returning functions still duplicate columns

On Nov 27, 2020, at 8:13 AM, Lukas Eder <lukas...@gmail.com> wrote:




On Fri, Nov 27, 2020 at 4:03 PM Rob Sargent <robjs...@gmail.com> wrote:
OK, old news. And in 3.14.3 as well (but you expected that, I believe). I can rework the function definition. 

I'm not sure what you mean. There have been hundreds of closed issues in version 3.14, not all of which backported to 3.13. It's always worth checking if a bug persists with the latest published version...
 
I see I didn't fill in my "pom[1]" footnote originally. Is line 6 of the pom.xml correct? I think it's a little early to reference "${org.jooq.groupId}" 
 --- a/pom.xml 
+++ b/pom.xml 
 @@ -3,7 +3,7 @@ 
<modelVerions>4.0.0</modelVersion> 

 - ${org.jooq.groupId} 
 + org.jooq

I'm not sure what this is about?

--
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+unsubscribe@googlegroups.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jooq-user/840B7715-6B00-42BD-8ED1-0B227E65AAA6%40gmail.com.

Rob Sargent

unread,
Nov 27, 2020, 2:23:43 PM11/27/20
to jooq...@googlegroups.com
It’s the pom of the mcve project

On Nov 27, 2020, at 10:36 AM, Lukas Eder <lukas...@gmail.com> wrote:

Rob, I know it's a diff but what are you trying to tell me? Is it related to this code generation issue?
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jooq-user/CAB4ELO7miNg%3DrDnbSJiQqud%2BtHz%3DTex4LEvfUrbS_1PLM55-CQ%40mail.gmail.com.

Lukas Eder

unread,
Nov 27, 2020, 2:27:54 PM11/27/20
to jOOQ User Group
I see, well it works, no?

On Fri, Nov 27, 2020 at 8:23 PM Rob Sargent <robjs...@gmail.com> wrote:
It’s the pom of the mcve project

On Nov 27, 2020, at 10:36 AM, Lukas Eder <lukas...@gmail.com> wrote:

Rob, I know it's a diff but what are you trying to tell me? Is it related to this code generation issue?

Am Freitag, 27. November 2020 schrieb Rob Sargent <robjs...@gmail.com>:
That’s diff(a la emacs) of the original pom.xml with my version. 
I question line six of the pom, but I’m not a maven user these days. 

And, to main point, overloaded table returning functions still duplicate columns

On Nov 27, 2020, at 8:13 AM, Lukas Eder <lukas...@gmail.com> wrote:




On Fri, Nov 27, 2020 at 4:03 PM Rob Sargent <robjs...@gmail.com> wrote:
OK, old news. And in 3.14.3 as well (but you expected that, I believe). I can rework the function definition. 

I'm not sure what you mean. There have been hundreds of closed issues in version 3.14, not all of which backported to 3.13. It's always worth checking if a bug persists with the latest published version...
 
I see I didn't fill in my "pom[1]" footnote originally. Is line 6 of the pom.xml correct? I think it's a little early to reference "${org.jooq.groupId}" 
 --- a/pom.xml 
+++ b/pom.xml 
 @@ -3,7 +3,7 @@ 
<modelVerions>4.0.0</modelVersion> 

 - ${org.jooq.groupId} 
 + org.jooq

I'm not sure what this is about?

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

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jooq-user/840B7715-6B00-42BD-8ED1-0B227E65AAA6%40gmail.com.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jooq-user/CAB4ELO7miNg%3DrDnbSJiQqud%2BtHz%3DTex4LEvfUrbS_1PLM55-CQ%40mail.gmail.com.

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

Rob Sargent

unread,
Nov 27, 2020, 3:00:54 PM11/27/20
to jooq...@googlegroups.com
There is a messsge generated. I’m not at my desk right now

On Nov 27, 2020, at 12:27 PM, Lukas Eder <lukas...@gmail.com> wrote:



Rob Sargent

unread,
Nov 27, 2020, 7:24:54 PM11/27/20
to jOOQ User Group
Here's the message:

[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.jooq:jooq-mcve:jar:1.0
[WARNING] 'groupId' contains an expression but should be a constant. @ ${org.jooq.groupId}:jooq-mcve:1.0, /home/rob/gits/github/jOOQ-mcve/pom.xml, line 6, column 14
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 


Lukas Eder

unread,
Nov 28, 2020, 3:59:45 AM11/28/20
to jOOQ User Group
Oh, yes of course, thanks for pointing that out
Reply all
Reply to author
Forward
0 new messages