Hi Luis,

The easiest way to do this is to override the JavaGenerator's
printColumnJPAAnnotation method, because that's the one that will be called
at the right moment when generating POJOs.

It's a bit of a workaround, but we currently don't support adding arbitrary
annotations to arbitrary places in generated classes. There could be quite
a few requirements that we don't see yet.

Hope this helps,
Lukas

2016-09-14 23:41 GMT+02:00 <[email protected]>:

> Hi! First of all thanks for all the good work and effort in building jooq!
> We love it!
>
> I just can't seem to find a way to define extra annotations when using a
> custom generator.
> We are generating POJOs with validations, but we wanted to add our custom
> validation with a simple annotation.
>
> For instance we force columns with .*URL.* expression to be a
> java.net.URL, but we wanted to add the annotation @URL to validate the
> input when using the entity in a POST request.
>
> Thanks for the help and keep up the good work.
>
> --
> 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.
>

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