Thank you very much for the information.

I do not need indexes in my code, that is for sure. I included it because 
the default seems to be "true". So, initially, this is what I have.

<embeddableUniqueKeys>.*</embeddableUniqueKeys>
<embeddablePrimaryKeys>.*</embeddablePrimaryKeys>

And I would get the same private field access compilation errors.

So, I disabled generating indexes. 

<!-- <includePrimaryKeys>true</includePrimaryKeys>-->
<includeIndexes>false</includeIndexes>
<!-- <includeForeignKeys>true</includeForeignKeys>-->
<!-- <includeUniqueKeys>true</includeUniqueKeys>-->
<embeddableUniqueKeys>.*</embeddableUniqueKeys>
<embeddablePrimaryKeys>.*</embeddablePrimaryKeys>

The compilation errors I get are now in the form of

cannot find symbol
    super(DBAbc.ABC.REL_ABC_EFG.getDataType().getRow());
                   ^
    symbol:   variable REL_ABC_EFG
    location: variable ABC of type DBAbc


Where ABC and EFG are two tables, where EFG has a foreign key from ABC.

I did check different instances of the class "DBAbc", and they don't have 
the "REL" fields. On the other hand, this is the weird thing I found,

DBEfg has that REL field. So, REL_ABC_EFG   is in DBEfg, not in DBAbc.

I then changed the config again to 

<includePrimaryKeys>true</includePrimaryKeys>
<includeIndexes>false</includeIndexes>
<includeForeignKeys>true</includeForeignKeys>
<includeUniqueKeys>true</includeUniqueKeys>
<embeddableUniqueKeys>.*</embeddableUniqueKeys>
<embeddablePrimaryKeys>.*</embeddablePrimaryKeys>

Same errors, but the compilation order has changed.

Thanks.

On Thursday, February 29, 2024 at 2:33:05 AM UTC-5 [email protected] wrote:

> Hello,
>
> Thanks for your report. This isn't a known issue yet. I've created a bug 
> to track this:
> https://github.com/jOOQ/jOOQ/issues/16379
>
> What other errors are you getting if you don't generate the indexes? There 
> only few reasons why you need the indexes in generated code, so the 
> simplest workaround for the above issue would be to turn off the generation 
> of indexes
>
> Best Regards,
> Lukas
>
> On Wed, Feb 28, 2024 at 10:44 PM Khun Yee Fung <[email protected]> 
> wrote:
>
>> Apologies if this has been asked before. I could find any previous 
>> messages discussing this issue. If it has been discussed before, please 
>> point me to the discussion.
>>
>> I just subscribed to the express version of jOOQ because I really wanted 
>> the primary keys to be their own types. When I added 
>>
>> <includePrimaryKeys>true</includePrimaryKeys>
>> <includeIndexes>true</includeIndexes>
>> <includeForeignKeys>true</includeForeignKeys>
>> <includeUniqueKeys>true</includeUniqueKeys>
>> <embeddableUniqueKeys>.*</embeddableUniqueKeys>
>> <embeddablePrimaryKeys>.*</embeddablePrimaryKeys>
>>
>> to my config file, I got errors when I compile the generated code. These 
>> errors in the Indexes.java have the following pattern:
>>
>> error: FIELD has private access in DBTable
>>
>> Basically one per index that I have in the database. I am using version 
>> 3.19.5 express, postgres 16.2.
>>
>> What did I do wrong, either in the config file, or any other places?
>>
>> I have other errors when I don't generate indexes. But these errors might 
>> all stem from the same issues that I have.
>>
>> Any hints or help would be appreciated.
>>
>> Thanks in advance.
>>
>> -- 
>> 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].
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jooq-user/7f4e2e2c-5b26-43b6-a277-06398024a95bn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/jooq-user/7f4e2e2c-5b26-43b6-a277-06398024a95bn%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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jooq-user/87d7a415-504a-4023-854f-40dfd3e23e3dn%40googlegroups.com.

Reply via email to