Skip to content

Releases: GetmeUK/MongoFrames

Projected keys in '$sub' or 'Ssub.' projections are now convered to full paths within the projection.

06 Feb 23:42

Choose a tag to compare

Previous to this release projections within $sub or $sub. where simply ignored and the projection was converted to True for the key, for example:

lairs = Lair.many(
    projection={
        '_id': True,
        'inventory': {
            '$sub': Inventory,
            'gold': True
    }
)

Previously used the projection:

{
     '_id: True, 
     'inventory': True
}

In this release this will now project to:

{
     '_id: True, 
     'inventory.gold': True
}

NOTE: This release is a minor release as whilst this should effect existing code if you've previous been setting projections (which simply were ignored before) this could potentially break this code.

Fixes: updated and deleted hooks on update/delete_many methods

17 Dec 23:32

Choose a tag to compare

1.2.14

Fix for delete_many update_many post event hooks

Added support for mongo keywords in projects

15 Aug 16:39

Choose a tag to compare

For example this is now possible:

projection={
    'employees': {
        '$ref': Employee,
        '$slice': 2,
       'name': True
    }
}

So get the first 2 employee Ids in an array of employee Ids stored against the field employees and project them as Employee documents selecting only the name field for each.

Fixed issue where empty dictionaries were not converted to SubFrame instances

13 Aug 17:18

Choose a tag to compare

Fix to allow $meta projections

29 Apr 21:00

Choose a tag to compare

1.2.11

Fix to allow $meta projections

Fix for pymongo version in dependencies

29 Apr 13:35

Choose a tag to compare

As Collation is now passed through the standard mongoframes import the pymongo dependency need to be updated (thanks to the @TheGent for flagging this).

Additional pymongo pass-throughs in the base __init__

23 Mar 14:19

Choose a tag to compare

Added additional pymongo pass-thoughs in the base init for convenience: Collation, GEOSPHERE, TEXT.

Fixes for nullify and pull

24 Oct 22:04

Choose a tag to compare

Nullify and pull now work as documented (and intended).

Support for sorting shortcuts

28 Aug 13:18

Choose a tag to compare

New features

  • The $sub. projection keyword now supports for dictionaries containing list values not just dictionary values.
  • New functionality added to make sort by instructions easier to define, e.g:
articles = Article.many(Q.published == True, sort=SortBy(Q.published_date.desc, Q.title))

Requirements update

16 Feb 13:32

Choose a tag to compare

Updated the setup requirements to use Faker which was renamed from fake-factory.