Skip to content

Commit a0d9c2d

Browse files
committed
release notes corrections.
1 parent 3ea958c commit a0d9c2d

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

Release Notes/Release Notes v1.5.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ Breaking changes
2020
- ObjectId.TryParse will now return false instead of throwing an exception when argument is null
2121
- 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.
2222
- 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;
2426

2527
JIRA issues resolved
2628
--------------------
@@ -30,11 +32,7 @@ The full list of JIRA issues resolved in this release is available at:
3032
https://jira.mongodb.org/secure/IssueNavigator.jspa?mode=hide&requestId=11900
3133

3234
High-Level Library Changes
33-
====================
34-
35-
C# null vs BsonNull.Value distinction
36-
-------------------------------------
37-
(null in the .NET world, BsonNull.Value in the BsonDocument object model)
35+
==========================
3836

3937
Medium Trust
4038
-----------
@@ -52,11 +50,11 @@ Support for Azure partial trust should work without changes. However, the defau
5250

5351
Custom Collection Serialization
5452
-------------------------------
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.
5654

5755
Query Builder
5856
--------------
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.
6058

6159
In the older version, a complex query would be built as follows.
6260

@@ -82,7 +80,7 @@ In version 2.0, we'll be removing the DeprecatedQuery class, so you'll need to u
8280

8381
Typed Builders
8482
-------------------
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.
8684

8785
For instance, given that we have a Person class defined:
8886

@@ -135,7 +133,7 @@ We continue to make Linq improvements. Thanks to all who report missing feature
135133

136134
- Nullable Enums are now supported.
137135
- 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.
139137

140138
var local = new List<int> { 1, 2, 3};
141139

0 commit comments

Comments
 (0)