I'm just wondering if the app supports mssql. I found datasource configuration for H2 and PostgreSQL but non for other datasources supported by Quarkus.
Asked
Active
Viewed 168 times
1 Answers
2
Optaweb-employee-rostering is a rich example application that shows how the employee rostering problem can be solved with OptaPlanner. As such, users are expected to take inspiration from it and change the app as they need.
If you want to try the app with MS SQL, replace a JDBC driver dependency: https://github.com/kiegroup/optaweb-employee-rostering/blob/main/optaweb-employee-rostering-backend/pom.xml#L81-L84
and change the Quarkus profile: https://github.com/kiegroup/optaweb-employee-rostering/blob/main/optaweb-employee-rostering-backend/src/main/resources/application.properties#L24-L28
The Quarkus profile can be activated during the build by specifying the quarkus.profile
maven property, e.g.:
mvn clean install -Dquarkus.profile=postgres

Radovan Synek
- 954
- 6
- 11
-
When I run the app or the optaweb-employee-rostering-backend, it dynamically creates the H2 database in-memory. If it's not too much to ask, can you point me to the file(s) that define and create the schema of the database? – Ivan T Jan 21 '22 at 14:45
-
That is defined in the `application.properties` file I provided a link to. Please have a look at my edited answer to see how to switch the DB profiles. – Radovan Synek Jan 21 '22 at 15:43
-
What I'm actually looking for is how the tables (contract, employee, tenant etc.) and functions of the database were created. Are the tables and functions defined somewhere in the application in some sort of a file (xml, json, etc.) where quarkus is mapped to? Where? As always, I appreciate the answers. :) – Ivan T Jan 21 '22 at 18:30
-
The persistence is handled by Hibernate, which is available in the Quarkus ecosystem as an extension [1]. The mapping of domain classes to tables is a part of the domain model [2] in the form of `javax.persistence.*` annotations. [1] https://quarkus.io/guides/hibernate-orm [2] https://github.com/kiegroup/optaweb-employee-rostering/tree/main/optaweb-employee-rostering-backend/src/main/java/org/optaweb/employeerostering/domain – Radovan Synek Jan 24 '22 at 07:38