Can you try using our MCVE templates?
https://github.com/jOOQ/jOOQ-mcve

As you can see here, the override is being generated, for example for SQL
Server:
https://github.com/jOOQ/jOOQ-mcve/blob/main/jOOQ-mcve-java-sqlserver/src/main/java/org/jooq/mcve/java/sqlserver/tables/Test.java#L129

I'm not sure what else could be the problem...

On Mon, Nov 13, 2023 at 2:23 PM Alex <alex.ryan.k...@gmail.com> wrote:

> Yes. Here's the output from my codegen script:
>
> 08:22:25,114  INFO [org.jooq.Constants                                ] -
> Thank you for using the 30 day free jOOQ 3.18.7 trial edition (Build date:
> 2023-11-02T04:38:15Z)
>
> On Monday, November 13, 2023 at 8:14:06 AM UTC-5 lukas...@gmail.com wrote:
>
>> Are you also using the 3.18.7 version of the code generator?
>>
>> On Mon, Nov 13, 2023 at 2:06 PM Alex <alex.ry...@gmail.com> wrote:
>>
>>> Thanks for the tips.
>>>
>>> The startup logs for jooq do indicate "Thank you for using the 30 day
>>> free jOOQ 3.18.7 trial edition (Build date: 2023-11-02T04:38:15Z)"
>>>
>>> I am able to see that code generation flag you mentioned in the current
>>> Generator.java
>>> <https://github.com/jOOQ/jOOQ/blob/98e739494b12804cfe1249766501c96aab334949/jOOQ-codegen/src/main/java/org/jooq/codegen/Generator.java#L1401>,
>>> however when I have my IDE decompile the same file, it does not appear. In
>>> fact, a quick search seems to suggest that none of the changes to
>>> Generator.java after this version of the file
>>> <https://github.com/jOOQ/jOOQ/blob/38f2ccef8aab8b82de2e71249dc131204cc7b86e/jOOQ-codegen/src/main/java/org/jooq/codegen/Generator.java>
>>>  are
>>> present.
>>>
>>> On Monday, November 13, 2023 at 7:41:39 AM UTC-5 lukas...@gmail.com
>>> wrote:
>>>
>>>> Check for these things:
>>>>
>>>> - There's a code generation flag generateRenameMethodOverrides to turn
>>>> this off (it's turned on by default, though)
>>>> - Check that you're really using that latest version, e.g. with mvn
>>>> dependency:tree (especially if you're using third parties like Spring Boot
>>>> or Etienne Studer's gradle plugin, which use hard-coded default versions,
>>>> some version issues are to be expected)
>>>> - Check why the IDE is saying that. The generated code is local to your
>>>> workspace, so you'll find it there.
>>>>
>>>> On Mon, Nov 13, 2023 at 1:37 PM Alex <alex.ry...@gmail.com> wrote:
>>>>
>>>>> Interesting. I just recently downloaded the trial of jOOQ 3.18.7. Is
>>>>> it possible that this functionality is missing from that?
>>>>>
>>>>> On Monday, November 13, 2023 at 7:30:27 AM UTC-5 lukas...@gmail.com
>>>>> wrote:
>>>>>
>>>>>> Well, https://github.com/jOOQ/jOOQ/issues/13336 was implemented in
>>>>>> jOOQ 3.17, so I suggest upgrading then.
>>>>>>
>>>>>> On Mon, Nov 13, 2023 at 12:58 PM Alex <alex.ry...@gmail.com> wrote:
>>>>>>
>>>>>>> In my case, I am trying to do:
>>>>>>>
>>>>>>> AuditTable a = AuditTable.AUDITTABLE.rename("a");
>>>>>>> // Operate with a.ID
>>>>>>>
>>>>>>> AuditTable is code generated and extends TableImpl<AuditTableRecord>.
>>>>>>> AuditTable.AUDITTABLE is the static member that returns "new
>>>>>>> AuditTable()"
>>>>>>>
>>>>>>> The IDE is saying that AuditTable.AUDITTABLE.rename("a") is
>>>>>>> returning Table<AuditTableRecord>, not AuditTable.
>>>>>>>
>>>>>>> Is the generated code for TBook and T_BOOK somewhere I can look at?
>>>>>>> I tried searching through the github repository and wasn't able to find 
>>>>>>> it.
>>>>>>>
>>>>>>> On Monday, November 13, 2023 at 3:10:31 AM UTC-5 lukas...@gmail.com
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Hi Alex,
>>>>>>>>
>>>>>>>> I've just tried this:
>>>>>>>>
>>>>>>>> TBook b = T_BOOK.rename("b");
>>>>>>>> System.out.println(
>>>>>>>>     ctx.select(b.ID).from(b)
>>>>>>>> );
>>>>>>>>
>>>>>>>> And it prints the expected:
>>>>>>>>
>>>>>>>> select "public"."b"."id"
>>>>>>>> from "public"."b"
>>>>>>>>
>>>>>>>> So, you're probably thinking of something *specific *that didn't
>>>>>>>> work for you?
>>>>>>>>
>>>>>>>> Best Regards,
>>>>>>>> Lukas
>>>>>>>>
>>>>>>>> On Sat, Nov 11, 2023 at 5:58 PM Alex <alex.ry...@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Hello,
>>>>>>>>>
>>>>>>>>> I have a database that contains several hundred tables with the
>>>>>>>>> same structure, just different names. Reading through the 
>>>>>>>>> documentation,
>>>>>>>>> using Table.rename(Name) seems to be most appropriate for my querying 
>>>>>>>>> needs.
>>>>>>>>>
>>>>>>>>> Unfortunately, the example code on
>>>>>>>>> https://www.jooq.org/doc/latest/manual/code-generation/codegen-advanced/codegen-config-generate/codegen-covariant-overrides/codegen-covariant-overrides-rename/
>>>>>>>>>  does
>>>>>>>>> not appear to be valid. I want to be able to do exactly what that 
>>>>>>>>> example
>>>>>>>>> is doing (take a generated table, change the table name that it is
>>>>>>>>> associated with, and still be able to use the generated fields to 
>>>>>>>>> produce a
>>>>>>>>> valid query).
>>>>>>>>>
>>>>>>>>> I am pretty new to jOOQ, so it is possible I am misunderstanding
>>>>>>>>> the intent of rename().
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>> Alex
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> 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/dcec73a5-ca53-43a8-9b49-abfd4ec9e052n%40googlegroups.com
>>>>>>>>> <https://groups.google.com/d/msgid/jooq-user/dcec73a5-ca53-43a8-9b49-abfd4ec9e052n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>>>> .
>>>>>>>>>
>>>>>>>> --
>>>>>>> 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/1a124c0d-71dd-4aa0-b300-a88cd27e63a3n%40googlegroups.com
>>>>>>> <https://groups.google.com/d/msgid/jooq-user/1a124c0d-71dd-4aa0-b300-a88cd27e63a3n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>> .
>>>>>>>
>>>>>> --
>>>>> 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/0107990a-fe5a-4335-bf65-8102507afc9en%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/jooq-user/0107990a-fe5a-4335-bf65-8102507afc9en%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>> --
>>> 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/8f21e770-4771-4ccf-acef-b3ff8d357de5n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/jooq-user/8f21e770-4771-4ccf-acef-b3ff8d357de5n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jooq-user/6080877e-548e-4927-97ec-1a18c49d29a7n%40googlegroups.com
> <https://groups.google.com/d/msgid/jooq-user/6080877e-548e-4927-97ec-1a18c49d29a7n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jooq-user/CAB4ELO5SaX2yOMBp5g%3DUkwHd6TG8T42JmZMRfnJhWCG-0mV4Eg%40mail.gmail.com.

Reply via email to