querydsl-maven-plugin with multiple oracle schemas

238 views
Skip to first unread message

Filipe Sousa

unread,
Jan 22, 2016, 2:00:25 AM1/22/16
to Querydsl
Hello,

I'm trying to use querydsl-maven-plugin against an oracle database that has several schemas. In my case, the database user rad has access to RAD and SH schemas. If I don't specify the schemaPattern, the plugin generates hundreds of classes from schemas that I don't need. I can restrict to one schema and have classes generated to that schema.

<configuration>
<jdbcDriver>oracle.jdbc.OracleDriver</jdbcDriver>
<jdbcUrl>${querydsl.jdbc.url}</jdbcUrl>
<jdbcUser>rad</jdbcUser>
<jdbcPassword>${password}</jdbcPassword>
<targetFolder>${project.build.directory}/generated-sources/java</targetFolder>
<exportBeans>true</exportBeans>
<schemaPattern>RAD</schemaPattern>
...


But, how can I choose more than one schema? I tried using <schemaPattern>RAD,SH</schemaPattern>, but did not generate any classes.

Do I have to create multiple configurations, one for each schema or is there a better way?

I'm using querydsl 4.0.8.BUILD-SNAPSHOT

Thank you.

timowest

unread,
Jan 23, 2016, 4:35:03 AM1/23/16
to Querydsl
Multiple executions is currently the way to do it.

Feel free to create an issue or PR for adding direct multi-schema support.

Filipe Sousa

unread,
Jan 25, 2016, 6:24:49 AM1/25/16
to Querydsl
I think I can survive with multiple executions. Anyway I created an issue for this

Thank you.
Reply all
Reply to author
Forward
0 new messages