---
title: "Comment by Adam Lewis on \"Catch N+1 Queries in Spring Boot Tests by Asserting the Query Count\" | Hashnode"
description: "Nice one, the part about the counter belonging to the SessionFactory is what I'd have got wrong."
url: "https://hashnode.com/posts/catch-n-plus-1-queries-spring-boot-tests/6b090b1e8a3e07d7992dace4/comment/6b0aa28f6212949bcce5cfca"
---

[Discussion](https://hashnode.com/posts/catch-n-plus-1-queries-spring-boot-tests/6b090b1e8a3e07d7992dace4)

Comment [Catch N+1 Queries in Spring Boot Tests by Asserting the Query Count](https://hashnode.com/posts/catch-n-plus-1-queries-spring-boot-tests/6b090b1e8a3e07d7992dace4)

[Adam Lewis](https://hashnode.com/@nark3d)

[13h ago](https://hashnode.com/posts/catch-n-plus-1-queries-spring-boot-tests/6b090b1e8a3e07d7992dace4/comment/6b0aa28f6212949bcce5cfca)

Nice one, the part about the counter belonging to the SessionFactory is what I'd have got wrong.
