2016-01-07 0:45 GMT+01:00 <[email protected]>:

>
>
> On Tuesday, January 5, 2016 at 8:57:09 AM UTC+1, Lukas Eder wrote:
>>
>> Hi Joseph,
>>
>> 2016-01-04 23:01 GMT+01:00 <[email protected]>:
>>
>>> Hi Lukas
>>>
>>> Thanks a lot for your answer :)
>>>
>>> My use case is explained there
>>> https://groups.google.com/forum/#!topic/jooq-user/I9iLbMQNN8o => I want
>>> to have the current domain classes extend the latest version.
>>>
>>
>> OK. I still think it's a bad idea in the long run :-)
>>
>
> agreed :)
>
> I'm now thinking of copy/pasting the latest model in both the "current"
> model folder and the vX folder
>
> no need to extend anymore then, happy Sir ?
>

Excellent! Be sure to provide feedback about your experience with that
approach!


> However, to link with your discussion on the next model generation
>>> approach, maybe the new one could favor composition by extending some
>>> interface and then, internally, just have a private instance of the actual
>>> impl and delegate to it. It would be pretty easy to do I guess and feels
>>> like rather clean as far as I see it.
>>>
>>
>> Interfaces can't have attributes, so that would require adding nasty
>> parentheses behind every reference:
>>
>> CATALOG().SCHEMA().TABLE().COLUMN()
>>
>>
>> Unless I'm missing something?
>>
>
> a bit
> I'm thinking of the following impl (dirty pseudo code) :
> public class FlywayTest implements Schema {
>
> private final SchemaImpl schemaImpl = new SchemaImpl("FlywayTest");
>
> @Override
>     public final List<Sequence<?>> getSequences() {
>         return schemaImpl.getSequences();
>     }
>
> (...)
> }
>
> => hence SchemaImpl could be anywhere in your own package structure and
> jar. Way harder to fiddle with and no internal leaking.
>

Aha, I see. That might work indeed. There's some effort in delegating all
the calls of the Table type, but that's certainly doable.

I've registered a feature request as a reminder:
https://github.com/jOOQ/jOOQ/issues/4908

I'll certainly look into this. Removing the type hierarchy dependency would
definitely be a plus.

hopefully I helped a bit :)
>

You certainly did!

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

Reply via email to