In order to generate the most accurate SQL queries, the
oqt-maven-plugin simply executes each query it finds.
This way, the plugin always uses 100% OpenJPA code to generate the SQL
queries making the plugin less dependent of the used OpenJPA version.
Furthermore, your database configuration (database metadata)
impacts the way the SQL queries are generated and it would be
impossible to accurately simulate this.
No, this plugin needs no database structure at all. There is no need for tables, schema's, ... As long as OpenJPA can create a read-only connection it's good.
Yes
No. The connection is set to read-only to enfore this behaviour (as long as the JDBC driver supports this).
Unfortunately not. I currently can not find a correct way to load the classes from the target folder in such a way that it produces a correct output. For the best results, you must run the plugin with the jar containing the entities as a dependency of the plugin.