You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Release Notes/Release Notes v1.5.md
+8-10Lines changed: 8 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,9 @@ Breaking changes
20
20
- ObjectId.TryParse will now return false instead of throwing an exception when argument is null
21
21
- BsonDocumentWrapper no longer ignores null, but wrather wraps it with a BsonNull.Value. Any code relying on BsonDocumentWrapper ignoring null will need to be evaluated.
22
22
- Custom collection/dictionary classes are now serialized by a collection/dictionary serializer instead of the class map serializer. This means that the items will be serialized instead of the properties and fields. Any code relying on the old behaviour will need to use BsonClassMap.RegisterClassMap with their custom collection/dictionary to preserve the old behaviour.
23
-
- The static Query classed used to build queries has changed significantly. Users of this class can either modify their code or add a using statement alias to the old version -- using Query = MongoDB.Driver.Builders.DeprecatedQueryBuilder;
23
+
- The static Query class used to build queries has changed significantly. Users of this class can either modify their code or add a using statement alias to the old version. The DeprecatedQuery version will get dropped in version 2.0.
24
+
25
+
using Query = MongoDB.Driver.Builders.DeprecatedQuery;
24
26
25
27
JIRA issues resolved
26
28
--------------------
@@ -30,11 +32,7 @@ The full list of JIRA issues resolved in this release is available at:
(null in the .NET world, BsonNull.Value in the BsonDocument object model)
35
+
==========================
38
36
39
37
Medium Trust
40
38
-----------
@@ -52,11 +50,11 @@ Support for Azure partial trust should work without changes. However, the defau
52
50
53
51
Custom Collection Serialization
54
52
-------------------------------
55
-
Classes that implement IDictionary or IDictionary<TKey, TValue> are now always serialized by a DictionarySerializer. Classes that implement IEnumerable ot IEnumerable<T> are now always serialized by a CollectionSerializer. We believe that a large majority of the time, classes implementing the collection interfaces intend for their items to be persisted rather than any properties (such as Count). This should enable the use of custom collection classes without any extra effort on your part.
53
+
Classes that implement IDictionary or IDictionary<TKey, TValue> are now always serialized by a DictionarySerializer. Classes that implement IEnumerable ot IEnumerable< T > are now always serialized by a CollectionSerializer. We believe that a large majority of the time, classes implementing the collection interfaces intend for their items to be persisted rather than any properties (such as Count). This should enable the use of custom collection classes without any extra effort on your part.
56
54
57
55
Query Builder
58
56
--------------
59
-
We have rewritten the static Query class. The old Query class followed the odd query syntax of mongodb and was found to be somewhat unintuitive for those coming from traditional C# backgrounds and relational databases. In addition, as we completed the new typed Query<T> static class (discussed below) to aid the building of queries for classes that are using class maps underneath, we found that the difference in the old one and the new one was too stark.
57
+
We have rewritten the static Query class. The old Query class followed the odd query syntax of mongodb and was found to be somewhat unintuitive for those coming from traditional C# backgrounds and relational databases. In addition, as we completed the new typed Query< T > static class (discussed below) to aid the building of queries for classes that are using class maps underneath, we found that the difference in the old one and the new one was too stark.
60
58
61
59
In the older version, a complex query would be built as follows.
62
60
@@ -82,7 +80,7 @@ In version 2.0, we'll be removing the DeprecatedQuery class, so you'll need to u
82
80
83
81
Typed Builders
84
82
-------------------
85
-
In conjunction with the new query builder, we have also included typed builders that mirror all the existing builders. So, Query has a corresponding Query<T> class, Update has a corresponding Update<T> class, etc... The huge benefit to this is that you can remove your "magic" strings from your code! In addition, anyone using custom serializers with class maps has support built-in for value based comparisons.
83
+
In conjunction with the new query builder, we have also included typed builders that mirror all the existing builders. So, Query has a corresponding Query< T > class, Update has a corresponding Update< T > class, etc... The huge benefit to this is that you can remove your "magic" strings from your code! In addition, anyone using custom serializers with class maps has support built-in for value based comparisons.
86
84
87
85
For instance, given that we have a Person class defined:
88
86
@@ -135,7 +133,7 @@ We continue to make Linq improvements. Thanks to all who report missing feature
135
133
136
134
- Nullable Enums are now supported.
137
135
- ContainsKey on any typed impementing IDictionary or IDictionary<K,V> is now supported and will generate a query corresponding to it's serialization format.
138
-
- Contains can now be used on any type implementing IEnumerable or IEnumerable<T> and will be serialized to it's corresponding form. In the case of a local collection containing a field, this would generate an $in clause.
136
+
- Contains can now be used on any type implementing IEnumerable or IEnumerable< T > and will be serialized to it's corresponding form. In the case of a local collection containing a field, this would generate an $in clause.
0 commit comments