Hi Venkat,

I've checked the sources again. The reason for Keys.java's being is clearly
meta data initialisation management. Imagine two tables referencing each
other with foreign keys: A -> B, B -> A.  If A was initialised first,

- it would transitively initialise the A -> B foreign key literal,
- which would then require B to be initialised,
- which would transitively initialise the B -> A foreign key literal,
- which would then require A to be initialised, which it isn't

I guess that a self-referencing foreign key A -> A might have the same
effect.

So, unless you have a good idea how to circumvent the above problem, I
would prefer to discuss workarounds to your current issue, rather than
trying to tackle this initialisation problem.

Cheers
Lukas


2013/9/16 Lukas Eder <[email protected]>

>  Hi Venkat
>
> Your suggestion appears sensible at first, although I'm sure there had
> been a good reason for the current design - either related to
> initialisation or (less likely) to naming collisions. I think that the
> current solution guarantees that tables and fields are initialised before
> primary keys, which again are initialised before foreign keys.
>
> I don't rule out a better solution, also with respect to metadata
> initialisation.
>
> Cheers,
> Lukas
>  ------------------------------
> Von: Venkat Sadasivam <[email protected]>
> Gesendet: 16.09.2013 20:00
> An: [email protected]
> Betreff: Re: Generate code for specific table
>
> Hi Lukas:
>
> By creating UniqueKey and ForeignKey constants inside the respective table
> class will solve the issue. Like use did in Tables.java constants can be
> referred from appropriate table specific classes.
>
> Regards,
> Venkat
>
> On Monday, 16 September 2013 13:13:51 UTC-4, Lukas Eder wrote:
>>
>> Hi Venkat,
>>
>> By "update", do you mean putting Keys.java (and other generated files)
>> under version control? I'm not sure if there is a good solution to this
>> problem, short of generating code at build time, avoiding to check it in.
>>
>> From previous discussion, I suspect that splitting the 800 tables into
>> different schemas, or creating different users with distinct grants is not
>> an option?
>>
>> Cheers
>> Lukas
>>
>>
>> 2013/9/16 Venkat Sadasivam <[email protected]>
>>
>>> Hi Lukas:
>>>
>>> Keys.java contains details for all tables, if I want to generate classes
>>> only for a few tables then I cannot update Keys.java.
>>>
>>> Regards,
>>> Venkat
>>>
>>>
>>> On Monday, 16 September 2013 11:16:55 UTC-4, Lukas Eder wrote:
>>>
>>>>  Hi Venkat,
>>>>
>>>> What is the reason why you do not want the Keys.java class generated?
>>>> The way jOOQ works right now, this class and its contents are required for
>>>> records to be updatable, as primary key information is stored in there.
>>>>
>>>> Regards,
>>>> Lukas
>>>>
>>>>
>>>> 2013/9/16 Venkat Sadasivam <[email protected]>
>>>>
>>>>>  Hello:
>>>>>
>>>>> In some instance I want to generate java classes for only a few
>>>>> specific tables. In that case Table classes refers global reference class
>>>>> Keys.java which we do not want. If we turn off generate relation then we
>>>>> records are not updateable. Any suggestion to overcome this issue?
>>>>>
>>>>> Thanks,
>>>>> Venkat
>>>>>
>>>>> --
>>>>> 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**.
>>>>>
>>>>> For more options, visit 
>>>>> https://groups.google.com/**grou**ps/opt_out<https://groups.google.com/groups/opt_out>
>>>>> .
>>>>>
>>>>
>>>>  --
>>> 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.
>>> For more options, visit 
>>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>> .
>>>
>>
>> --
> 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/groups/opt_out.
>

-- 
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/groups/opt_out.

Reply via email to