Hi Loris,

Unfortunately, there isn't any such tool. However, you can use generator
strategies to let the code generator have the two distinct records extend a
common interface:

- Programmatic:
https://www.jooq.org/doc/latest/manual/code-generation/codegen-generatorstrategy/
- Configurative:
https://www.jooq.org/doc/latest/manual/code-generation/codegen-matcherstrategy/

You could even extend the code generator to generate this interface for
you. Or you enable interface generation on all records, and have one record
also implement the interface of the other record via a generator strategy.

I hope this helps,
Lukas

On Tue, Jun 7, 2022 at 10:55 AM Loris Chiocca <[email protected]> wrote:

> Hi
>
> I've got database that has tables and equivalent views ontop of these
> tables. The views contain a security layer on the database, but otherwise
> return the exact same content as the tables. Currently, the generator
> creates all the objects twice, which is expected. Is there a way to "tweak"
> the generator to create two table definitions (one for the real table and
> one for the view) to use the same record?
>
> Thanks
> Loris
>
> --
> 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/3d1f3cd3-268e-4da9-9e0d-ab3380f41996n%40googlegroups.com
> <https://groups.google.com/d/msgid/jooq-user/3d1f3cd3-268e-4da9-9e0d-ab3380f41996n%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/CAB4ELO7fbM6BsmTjYdMKa6D9EBh%3D-1JRLJUDtPrMvFfcrjtpKw%40mail.gmail.com.

Reply via email to