Hello Lukas,
Am Sonntag, 19. Juni 2016 20:01:45 UTC+2 schrieb Lukas Eder:
>
> Hello Christian,
>
> Yes, this should be possible. I suspect your marker interface should be
> generic with the primary key type:
>
> public interface PKHolder<PKType> {
> PKType getPrimaryKey();
> }
>
>
That's right!
>
> Now, use a generator strategy to add the interface to the "implements"
> section of each relevant POJO:
>
> http://www.jooq.org/doc/latest/manual/code-generation/codegen-generatorstrategy
>
I got that already :-)
> There is also the possibility to add a configurative generator strategy,
> but that won't be sufficient in your use-case as you probably need to
> introspect the primary key type:
>
> http://www.jooq.org/doc/latest/manual/code-generation/codegen-matcherstrategy
>
That's right.
> Now the last step is to actually implement the marker interface and the
> getPrimaryKey() method. This can be done by generating a custom code
> section:
> http://www.jooq.org/doc/latest/manual/code-generation/codegen-custom-code
>
OK, I see, I was at that point already but I wasn't sure.
I think with the above pointers, it should be possible to achieve what you
> want to do. Please, let me know if you encounter any issues or if some
> detail is unclear.
>
I will, thanks!
ciao
Christian
--
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.