-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Aggregation Framework
-
None
-
Minor Change
-
ALL
Observed behavior: An aggregation result based on a regular expression from mongod is converted to a string in the result set.
Expected behavior: The aggregation result is returned as a regular expression type.
Test:
> c.save( { a:/x/i } ) > c.find() { "_id" : ObjectId("5004823ca08131138fd399d6"), "a" : /x/i } > c.aggregate( { $project:{ b:'$a' } } ) { "result" : [ { "_id" : ObjectId("5004823ca08131138fd399d6"), "b" : "x" } ], "ok" : 1 }