Describe the bug:
As shown in the image below when using FirstOrDefault the transaction is not removed, when using ToList() in my case fixed it. When FirstOrDefault is used the yield return causes the ReleaseTransaction to be called. For contex the database on contained a single Tournament object the moment of reporting the bug.
Code to reproduce:
See screenshot.
Expected behavior:
The transaction should be released.
This issue has been addressed and fixed in the latest commit.
A new release is coming shortly.
Reopen this issue or open a new one if this issue persists in the upcoming version please.
Version: 5.0.19
Describe the bug: As shown in the image below when using FirstOrDefault the transaction is not removed, when using ToList() in my case fixed it. When FirstOrDefault is used the yield return causes the ReleaseTransaction to be called. For contex the database on contained a single Tournament object the moment of reporting the bug.
Code to reproduce: See screenshot.
Expected behavior: The transaction should be released.
Screenshot:
Originally posted by @PatrickSlamp in https://github.com/mbdavid/LiteDB/issues/2435#issuecomment-2119979483