JasperFx / marten

.NET Transactional Document DB and Event Store on PostgreSQL
https://martendb.io
MIT License
2.79k stars 441 forks source link

Add failing test for not increasing version #3191

Closed e-tobi closed 3 months ago

e-tobi commented 4 months ago

Not sure if this is a bug, but shouldn't the version increase with each saved change to a document?

jeremydmiller commented 3 months ago

@e-tobi Long story short, use UpdateRevision() here. You're going to get a better exception message explaining that now. Not a recommended usage to repeatedly call Store() on the same document in the same session.

jeremydmiller commented 2 months ago

This is going to get changed to warn about this. Use UpdateRevision()