Details
-
Bug
-
Resolution: Done
-
Major - P3
-
None
-
None
-
Minor Change
-
ALL
Description
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
|
}
|