With version 4.2.1 I get the error
while using querydsl-maven-plugin together with jdbcDriver com.mysql.cj.jdbc.Driver
(mysql-connector-java 8.0.11). This happens because the user I use to connect to MySQL has access to multiple databases. As a workaround I had to add nullCatalogMeansCurrent=true
to jdbcUrl
.
Do you configure separate packages for the multiple schemas?
Or do you filter the schemas with a pattern?
Can you paint the picture a bit more, since it's intended to fail when the maven plugin detects the class was already generated.
I filter the tables via tableNamePattern, and tried to filter via schemaPattern, but this has no effect. (schema is always null, catalog is different depending on database name).
Edit1: db looks like this:
db1:
db1.Users
db2:
db2.Orders
returns two items who look like this in MetaDataExporter::handleTable (pseudo json):
{catalog: db1, schema: null, tableName: Users}
{catalog: db2, schema: null, tableName: Users}
Edit2: I only use the schema db1. db2 is not used at all by my application, but the user happens to have access to it.
I have same issue !
Workaround : Create a new user in database which has access to only the given database for which you want to create Q files for. Done.