Generating code for two schemas of the same vendor
Consider two schemas of the same vendor named db1
and db2
. In the first schema (db1
), we have a table named productline
, and in the second schema (db2
), we have a table named product
. Our goal is to generate the jOOQ artifacts (to run the jOOQ Code Generator) for these two schemas of the same vendor (here, MySQL) and to execute queries against one or another, and even join these two tables.
Basically, as long as we don't specify any input schema, jOOQ generates code for all the schemas it can find. But since we want to instruct jOOQ to work only on the db1
and db2
schemas, we can do it as follows (here, for Maven):
<database> <schemata> <schema> <inputSchema>db1</inputSchema> </schema> <schema> <inputSchema>db2</inputSchema> </schema> </schemata...