marten
marten copied to clipboard
Make upsert optional
The upsert-functionality is nice, but way to intrusive in some cases. Assuming that inserts and updates are equal operations is an assumption which can't possibly fit all scenarios. A few different suggestions:
- Make it possible to opt-out at runtime, session.Store( upsert:false)
- Make it possible to opt-out when configuring the document store
- Make it possible for the user to make decisions as to how the situation should be handled by a callback instead of the upsert being handled at sql-level (avoid user-transparency)
@mariusin79,
Mostly a duplicate with #700 -- but having a second person ask for it makes me feel better about having it. This will be in 2.0 within the next week or so. It's an explicitly different operation for pure Inserts or Updates, so IDocumentSession.Insert() or IDocumentSession.Update().