Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

querydsl-maven-plugin to support multiple schemas at once #1766

Closed
natros opened this issue Jan 25, 2016 · 2 comments
Closed

querydsl-maven-plugin to support multiple schemas at once #1766

natros opened this issue Jan 25, 2016 · 2 comments
Milestone

Comments

@natros
Copy link
Contributor

natros commented Jan 25, 2016

Add property to querydsl-maven-plugin to support multiple schemas at once.

Discussion
https://groups.google.com/d/msg/querydsl/5zuxYrhxz2U/say3FqpUBQAJ

Some suggestions:

<configuration>
    ....
    <schemaPattern>RAD,FOO,BAR</schemaPattern>
</configuration>
<configuration>
    ...
    <schemaPatterns>
        <schemaPattern>RAD</schemaPattern>
        <schemaPattern>FOO</schemaPattern>
        <schemaPattern>BAR</schemaPattern>
    </schemaPatterns>
</configuration>

PS: I'm using oracle 11gR2

Thank you.

@Shredder121
Copy link
Member

Just for reference, how would you solve schemaPattern and tableNamePattern combinations?
I think specifying multiple schemas then doesn't really make sense, what do you think?

@natros
Copy link
Contributor Author

natros commented Jan 26, 2016

At my organization we have several oracle databases, some os those databases are connected with database links. Each application has its own schema and has access to all other schemas that needs read or modify data. Creating a maven configuration for each schema has caused me so trouble with the plugin messing up with classes that have the same name, or referencing nonexistent classes.

In this project https://github.com/natros/querydsl-test I have two schemas GAL and RFID, both have the user table that are not equal. However, in the generation, the plugin generates the same class. So com.github.natros.entities.rfid.beans.Users is the same as com.github.natros.entities.gal.beans.Users which is wrong.

Some times I have to add to the configurations because the plugin cannot resolve the right class.

In some cases adding helps. (there's a branch schema-to-package in the sample project)

For tableNamePattern one could use SCHEMA.TABLE_NAME. For that would require inside.

BTW querydsl can't handle/see synonyms
https://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_7001.htm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants