I have just executed the code with driver release v1.2 (the one I used) and I can confirm that it does not fail there (i.e. all asserts are true). So something indeed has changed. But let's move forward.
Let me start with my typical use case to make clear what I want to achieve:
The use case is that your domain entities are stored in the database. But typically your system will grow and more properties will be added to entities from time to time. The 'older' entities in the database will not have these newly added properties. This wasn't a problem though, because when these 'older' entities were fetched from the database for processing the default values were supplied for the non-existing properties and you end up with a object that behaves jus as you would have if you had constructed it in the code and then set the properties yourself. Especially in new projects where there is a lot of dynamic this is very convenient. I think that this use case is quite common and the current behaviour might surprise some developers.
One can argue that setting the properties to null is a more accurate reflection of the actual document in the database, but in my experience this is not really what you want in the majority of the cases.
Anyway, to answer your question: the property should always be serialized. I don't care if it happens to be the default or not. The problem is that I am using default values that are not constant at compile time. So any attributes are of no use as they require constants. Using the class map is an option (that is how I have solved it for now), but for some reason I cannot set in the static class constructor (the map already exists at that point), so I end up specifying default values for a class in both the constructor and in another fairly unrelated initialization method, which is not ideal.
I did not know about ISupportInitialize (is it in the documentation?), but this seems like a good option. There are only two methods to override so not too much noise is added to my class. I will try this.
But even then I still have to specify my default values at two locations which is a bit error-prone. A solution might be an (not yet existing) attribute like [BsonIgnoreIfNotSet] that specified that if this property is not set in the database document then no action must be taken (i.e. not overwritten by null). This way you wouldn't have to specify your default value twice.
Having said all that, I also want to mention that the C# driver is great to work with and I'm glad to see that there is so much active development in improving it :)
Kind regards,
Bas