Hi Robert,
Yeah it was a bit of a knee jerk reaction to hearing that Norm was
dead after I just finished integrating a bunch of stuff with it. I
used to think that the 10Gen driver didnt support strongly typed
collections but apparently it does and the serialization support for
the most part is as good or better than Norm's (except for the need
for defining BsonKnownTypes - couldnt this be inferred automatically
using reflection?). The one thing with serialization that I still need
to figure out is does the serialization process support a hybrid mode.
With Norm I was able to extend from the expando class. If a BSON field
could be mapped to a strongly typed property on the class then it
would - otherwise it would be added to the expando's internal property
collection. This is useful for when refactoring changes are done and
some old mongo documents contain references to properties that are no
longer used. Otherwise without using expando as a base class an
exception would be thrown if a property couldnt be mapped.
As far as strongly typed updates - In Norm i can something like the
following: collection.Update(new {_id = 1}, m => m.AddToSet(d =>
d.Posts, new Post { Title = "hello" }));
where as in the 10Gen driver I would need to do something like: var
update = Update.Set("Title", "hello");
It seems like writing a strongly typed wrapper around the weakly typed
Update builder wouldn't be too much work though.
The lack of Linq is a bummer but the Fluent Mongo library seems to add
that functionality well enough.