diff --git a/mongoframes/frames.py b/mongoframes/frames.py index 8b5196b..a72799a 100644 --- a/mongoframes/frames.py +++ b/mongoframes/frames.py @@ -638,11 +638,17 @@ def _flatten_projection(cls, projection): inclusive = True for key, value in deepcopy(projection).items(): if isinstance(value, dict): + # Check for $meta projections + if '$meta' in value: + flat_projection[key] = value + continue + # Store a reference/sub-frame projection if '$ref' in value: references[key] = value elif '$sub' in value or '$sub.' in value: subs[key] = value + flat_projection[key] = True elif key == '$ref': @@ -785,4 +791,4 @@ def _apply_projection(cls, documents, projection): # Add sub-frames to the documents (if required) if subs: - Frame._apply_sub_frames(documents, subs) \ No newline at end of file + Frame._apply_sub_frames(documents, subs) diff --git a/setup.py b/setup.py index 5366de1..56930e2 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ # Versions should comply with PEP440. For a discussion on single-sourcing # the version across setup.py and the project code, see # https://packaging.python.org/en/latest/single_source_version.html - version='1.2.10', + version='1.2.11', description='A fast unobtrusive MongoDB ODM for Python', long_description=long_description,