GithubHelp home page GithubHelp logo

closeio / mongoengine Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mongoengine/mongoengine

38.0 38.0 8.0 6.51 MB

A Python Object-Document-Mapper for working with MongoDB

Home Page: http://mongoengine.org

License: MIT License

Python 100.00%

mongoengine's People

Contributors

alefnula avatar amcgregor avatar anemitz avatar atroche avatar benmur avatar colinhowe avatar danielhasselrot avatar daniil-sharou avatar dcrosta avatar flosch avatar glyphobet avatar hasenbanck avatar hmarr avatar iapain avatar jaepil avatar kajic avatar mattdennewitz avatar meirkriheli avatar mirceapasoi avatar n1k0 avatar nvie avatar paulswartz avatar punteney avatar rozza avatar samuelclay avatar schallis avatar stephrdev avatar thomasst avatar wojcikstefan avatar wpjunior avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mongoengine's Issues

`in_bulk` queries do not include a `_cls` attribute, so objects that inherit from the same base class can unexpectedly be returned

Right now, when using the in_bulk method, a _cls is not included in the query.

So, if you have documents like:

class Parent(Document):
    ...

class ChildOne(Parent):
    ...

class ChildTwo(Parent):
    ...

And then you try to do:

ChildTwo.objects.in_bulk(["PK of a ChildOne object"])

a ChildOne object will be returned even though you're using the ChildTwo document. This happens because a _cls is not included in the in_bulk query, so it just looks through the entire collection.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.