Hi Lukas,
My initial approach of using HashMap didn't appear to work as I got into
an endless loop. Seems the hash function triggers the VisitListener.
You idea for getSpecialField seemed a cleaner solution anyways, but in
my attempts to write it I referenced how JavaGenerator generates
getRecordVersion methods.
I was hoping to just extend the JavaGenerator class and override
generateTableClassFooter, but I ran into the problem that my method would
need the recordType and something like the following line (plucked from the
JavaGenerator)....
final String recordType = out.ref(getStrategy().getFullJavaClassName(table,
Mode.RECORD));
Isn't possible as all out.ref methods are protected. Am I missing an
obvious way to get 'recordType'? I wouldn't be surprised quite often the
obvious stuff eludes me.
Thanks in advance for the words of wisdom and a wonderful framework.
-Kevin
On Saturday, April 8, 2017 at 3:35:46 PM UTC-4, Lukas Eder wrote:
>
>
>
> 2017-04-08 21:32 GMT+02:00 Kevin Embree <[email protected] <javascript:>
> >:
>
>> Thank you Lukas,
>>
>> I think ...
>> ((Table<?>) context.queryPart()).field(name)
>> ... was the part I was missing.
>>
>> As to your comment about performance, as my schema will not change after
>> initialization of the system, when I initialize the EventListener i will
>> set up something such a Hashmap <Table, Field>, to quickly find the
>> corresponding field for the tables visited in the query context.
>>
>
> That's one option. Alternatively, you could extend the code generator to
> implement a getSpecialField() method on each table
>
> Hope this helps,
> 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 [email protected].
For more options, visit https://groups.google.com/d/optout.