Skip to content

Commit f8b7c8d

Browse files
author
Hugo Bonacci
committed
Changed the way the UpdateOptions are applied to a query to what I think, for the 5 time now, is the correct way...
1 parent 21c2699 commit f8b7c8d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Requests/UpdateRequest.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,13 @@ protected override void GenerateBody(DynamicStream stream) {
5858
stream.Append(BsonTranslator.AsString(this.GetDatabaseTarget()));
5959

6060
//generate the options and write them
61-
//BitVector32 options = new BitVector32(0);
62-
//options[0] = this.Options.Has(UpdateOptionTypes.Upsert);
63-
//options[1] = this.Options.Has(UpdateOptionTypes.MultiUpdate);
64-
stream.Append(BsonTranslator.AsInt32((int)this.Options));
61+
BitVector32 options = new BitVector32(0);
62+
options[1] = this.Options.Has(UpdateOptionTypes.Upsert);
63+
options[2] = this.Options.Has(UpdateOptionTypes.MultiUpdate);
64+
stream.Append(BsonTranslator.AsInt32(options.Data));
65+
66+
//not sure what the right way to do this is...
67+
//stream.Append(BsonTranslator.AsInt32((int)this.Options));
6568

6669
//then the actual selection
6770
stream.Append(this.Parameters.ToBsonByteArray());

0 commit comments

Comments
 (0)