Details
-
New Feature
-
Resolution: Fixed
-
Major - P3
-
None
-
None
-
None
-
Fully Compatible
-
Platforms 2017-05-29
Description
In testing a lot of IDL generated classes, a common pattern is the following:
BSONObjBuilder builder;
|
obj.serialize(&builder)
|
auto doc = builder.obj();
|
In order to reduce the amount of copy/pasted code, the following method will be added to IDL generated classes for testing IDL classes.
BSONObj toBSON() {
|
BSONObjBuilder builder;
|
obj.serialize(&builder)
|
return builder.obj(); |
}
|