I’m using spring, and the @Transactional annotation on my tests. The tests call the actual code, and are driven by some excel spreadsheet data files.
Anyway. In the business logic, I can see that some methods are mapped as “@Transactional” and others are not - however my tests run under one single transaction.
The problem is that code that touches entities in the business logic (but is not expecting to save/update them at the moment) is, in my test, being seen as an indicator to save/update (because there is only one transaction).
Is there some way to tell hibernate or the @Transactional to only do “transactional stuff” when the business logic method is supporting @Transactional?