Generation Issue

17 views
Skip to first unread message

Samir Faci

unread,
Feb 28, 2018, 11:50:19 AM2/28/18
to jooq...@googlegroups.com
jooq:  3.9.0

when I try to generate a table, which is named tag that's contained inside the schema named tag.  (I know jooq doesn't like this but in the past I'd end up with just a new table named tag_) I get the following error:


[ERROR] /Users/samirfaci/projects/docker/mip-db/target/generated-sources/jooq/biz/neustar/ms/db/schema/legacy/tag/tables/Tag.java:[118,19] error: cannot find symbol
[ERROR]   symbol:   variable IDENTITY_TAG
  location: class Keys
/Users/samirfaci/projects/docker/mip-db/target/generated-sources/jooq/biz/neustar/ms/db/schema/legacy/tag/Keys.java:[41,77] error: cannot find symbol
I think the correct value should be IDENTITY_TAG_ but just thought I'd mention it.

Our work around for now is to do something along these lines:

<strategy>
            <matchers>
                <tables>
                    <table>
                        <!--when the schema and table are the same name, a mismatch with the identity variables for the
                        tag table occurs, causing the generation to fail. This resolves that-->
                        <expression>tag.tag</expression>
                        <tableIdentifier>
                            <expression>TAG_TABLE</expression>
                        </tableIdentifier>
                    </table>
                </tables>
            </matchers>
        </strategy>

Is there a better / recommended way of dealing with these types of collisions?


--
Thank you
Samir Faci

Lukas Eder

unread,
Mar 1, 2018, 9:01:50 AM3/1/18
to jooq...@googlegroups.com
Hi Samir,

Thank you for your report. In order to help reproduce this issue, would you mind indicating the database vendor and version?

Indeed, using programmatic or configurative (as you did) generator strategies is the way forward to avoid these types of collisions.

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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Samir Faci

unread,
Mar 1, 2018, 1:52:35 PM3/1/18
to jooq...@googlegroups.com
Here you go Lukas, 

psql --version
psql (PostgreSQL) 10.2


Lukas Eder

unread,
Mar 9, 2018, 10:21:38 AM3/9/18
to jooq...@googlegroups.com
Thanks for your patience. I've tried this with a more recent version of jOOQ but couldn't reproduce it. I vaguely recall having fixed something along these lines. Have you tried upgrading to jOOQ 3.10.5?

Samir Faci

unread,
Mar 12, 2018, 6:56:34 PM3/12/18
to jooq...@googlegroups.com
I haven't tried upgrading, it's a bit of a process since we have so many artifacts that use jooq these days.  I'll try this again once we upgrade and will let you know.  

Just thought I'd share in case anyone else runs into.
Reply all
Reply to author
Forward
0 new messages