Skip to content

Commit 6893421

Browse files
author
bwajtr
committed
Fixed failed testa and added how to to the readme.md
1 parent b019c9c commit 6893421

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ Each scenario has it's implementation in the Scenarios class. See javadoc of [Sc
3535

3636
![Simple company database model](/SimpleCompanyModel.png?raw=true "Simple company database model")
3737

38+
## How-to
39+
40+
1. Clone the repository
41+
2. Configure PostgreSQL connection details in [application.properties](src/main/resources/application.properties)
42+
3. Create tables and data by running [create-script.sql](sql-updates/create-script.sql)
43+
4. Create one stored procedure by running [register_employee.sql](sql-updates/sql_functions/register_employee.sql)
44+
5. Give the scenarios a test run by running one of the test classes and enjoy :)
45+
3846
## Why only non-JPA?
3947

4048
Well, we were trying to "stick with standard" in our projects so we used JPA in the past, but after many years of JPA usage (Hibernate mostly), we realized it's counterproductive. In most of our projects it caused more problems than it helped to solve - especially in big projects (with lots of tables and relations). There are many reasons of those failures - but the biggest issue is that JPA implementations simply turned into bloatware. Lot of strange magic is happening inside and the complexity is so high, that you need a high-class Hibernate uberexpert in every team so the app actually shows some performance and the code is manageable...

src/main/java/com/clevergang/dbtests/repository/api/data/Department.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ public void setCompanyPid(Integer company_pid) {
3535
this.company_pid = company_pid;
3636
}
3737

38+
public Department() {
39+
// Actually jOOQ requires default constructor here
40+
}
41+
3842
public Department(Integer company_pid, String name) {
3943
this.company_pid = company_pid;
4044
this.name = name;

0 commit comments

Comments
 (0)