View source in XMLDatabase/XMLGenerator

21 views
Skip to first unread message

johann....@gmail.com

unread,
Jul 13, 2020, 11:03:30 AM7/13/20
to jOOQ User Group
Hi!

I have an issue when I updated from 3.11.10 to 3.13.2.

We are using jOOQ for generating source code in the following way:
*) Reverse engineer a postgres database to an information schema (XMLDatabase using XMLGenerator)
*) Generate Java&scala classes from this information schema (using XMLDatabase as source)

We are using views in our database.

With 3.11.10 the views where just represented as table structure without its source which was fine for our purpose.
The view source was added beginning this year (I think Issue #9805).

The problem is that the view source is not escaped for XML when generated via XMLGenerator.

The XML Parser when generating the java classes later (of course) stumbles because there are not-allowed characters in the content (e.g. "<" when comparing values within the view source).

Is there any way to work around that or is there another better approach I miss to see? Of course we want to keep the information schema as an artifact in our build.

Thanks and cheers,
 Hansi

Lukas Eder

unread,
Jul 13, 2020, 11:08:05 AM7/13/20
to jOOQ User Group
Thanks a lot for your report. That's a bug, we'll fix it ASAP:

In the meantime, you can turn off the generation of source code for views using the <sourcesOnViews/> flag, see:

Thanks,
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 jooq-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jooq-user/39ff0c98-c80a-4306-babc-6423573fce50o%40googlegroups.com.

Hansi J

unread,
Jul 13, 2020, 12:17:28 PM7/13/20
to jOOQ User Group
Hi Lukas,

thanks for your quick response. I tried to set the  <sourcesOnViews/> flag to false, but I don't think it worked. Could it be that this flag is only considered in the JavaGenerator?

Thanks and cheers,
 Hansi



Am Montag, 13. Juli 2020 17:08:05 UTC+2 schrieb Lukas Eder:
Thanks a lot for your report. That's a bug, we'll fix it ASAP:

In the meantime, you can turn off the generation of source code for views using the <sourcesOnViews/> flag, see:

Thanks,
Lukas 

On Mon, Jul 13, 2020 at 5:03 PM <johann...@gmail.com> wrote:
Hi!

I have an issue when I updated from 3.11.10 to 3.13.2.

We are using jOOQ for generating source code in the following way:
*) Reverse engineer a postgres database to an information schema (XMLDatabase using XMLGenerator)
*) Generate Java&scala classes from this information schema (using XMLDatabase as source)

We are using views in our database.

With 3.11.10 the views where just represented as table structure without its source which was fine for our purpose.
The view source was added beginning this year (I think Issue #9805).

The problem is that the view source is not escaped for XML when generated via XMLGenerator.

The XML Parser when generating the java classes later (of course) stumbles because there are not-allowed characters in the content (e.g. "<" when comparing values within the view source).

Is there any way to work around that or is there another better approach I miss to see? Of course we want to keep the information schema as an artifact in our build.

Thanks and cheers,
 Hansi

--
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 jooq...@googlegroups.com.

Lukas Eder

unread,
Jul 14, 2020, 7:52:55 AM7/14/20
to jOOQ User Group
Indeed, very unfortunate. I've created another issue for this: https://github.com/jOOQ/jOOQ/issues/10390

There are more workarounds, of course:

- You could patch XMLGenerator
- You could post-process the XMLGenerator's output
- You could pre-process the input for your XMLGenerator code generation run

I'll fix these two issues right away. I'm expecting a 3.13.3 release this week.
Thanks again for your report,
Lukas

To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jooq-user/e12898fb-fe4d-41a4-8774-7aa55bd7c3efo%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages