I use Precondition.None and it throw NullReferenceException
C#
transaction.Update(document,dictionary,Precondition.None);
I think this is a bug because what will be usage of Precondition.None
But then I wonder if it really intended. Is it the limitation that we could not really update document that not yet exist?
If it really be the case I would like to have Precondition.None be deprecated because it has no usage. But if it was a bug in the library then I would like to have it fix real soon
Any time you get a NullReferenceException, that's a bug, certainly, regardless of the intended behaviour.
I'll look into it - I'd expect to be able to get a fix out next week.
Okay, it turned out to be a simple bug. Yes, it's possible to use Update with a document that doesn't already exist, and I now have an integration test for that.
The bug will be fixed by #2481. It's a trivial fix, but I'll want to get #2480 merged as well before doing a release - and I wouldn't want to do a release on a Friday anyway. Hopefully this will mean a new release on Monday.
Apologies for the delay in the release - I tagged it, but apparently forgot to trigger a build. This is now available in v1.0.0-beta10.