My situation is similar to trying to manage many Book Stores by creating a unique database for each new bookstore with a unique database name for each book store.
To create my generated classes I upload my vcs maintained bookstore_database.sql file and then run jooq's generate utility. (That file does not have a USE statement)
I did not realize that in the generated files the generated bookstore_database.java file contains ...
/**
* No further instances allowed
*/
private
bookstore_database
() {
super("
bookstore_database
", null);
}
I create new book store databases using a command line routine that redirects the base sql file to a new bookstore database each time a new book store is added.
During initialization I could not figure out why insert/store statements were returning counts but no records were in the database, until I saw they were being added to the originally named bookstore_database instead of chicago_bookstore.
I am not sure if removing the private statement above would resolve the situation or there is a better way to achieve the desired many identical schema'd databases.
I appreciate any thoughts or suggestions.
Jim McGlaughlin, NH, USA