Commit 1d54c2f
authored
fix(audit_log): Prefetch Fk relations to avoid n+1 (#197)
* fix(audit_log): Prefetch Fk relations to avoid n+1
Closes: #174
* test(audit_logs): Add test to check the number of query executed
The test will make sure that we are not executing more than 2 queries
in the API(one for the result and the other one for pagination)
* !fixup: inspect the response to check the count1 parent 8f0578f commit 1d54c2f
2 files changed
Lines changed: 17 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
0 commit comments