You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hibernate is a powerful ORM, but you need to have control over the executed SQL queries to avoid huge performance problems (N+1 select, silent updates, batch not working, etc...)
3
+
Hibernate is a powerful ORM, but you need to have control over the executed SQL queries to avoid huge performance problems (N+1 selects, silent updates, batch insert not working, etc...)
4
4
5
-
You can enable SQL query logging, this is a great help in dev, but this tool helps you to count the executed queries by Hibernate in your integrations test.
5
+
You can enable SQL query logging, this is a great help in dev, but this tool helps you to count the executed queries by Hibernate in your integration tests.
6
6
7
-
It consists of just an Hibernate SQL inspector service and a Spring Test Listener that reads it (so no proxy around the Datasource)
7
+
It consists of just an Hibernate SQL inspector service and a Spring Test Listener that enable it (so no proxy around the Datasource)
8
8
9
9
## Example
10
10
11
+
You just have to add the @AssertSQLStatementCount annotation to your test and it will verify the SQL statements count at the end of the test:
0 commit comments