Mongoengine: Make reference fields a proxy to allow access to field.id without dereferencing

Created on 26 Apr 2013  路  16Comments  路  Source: MongoEngine/mongoengine

When looking at any other value then trigger a dereference either directly or on the list.

refs: #61

(De)Reference High Priority Performance

Most helpful comment

We've implemented this (among many other things) in my company's fork of this package (https://github.com/closeio/mongoengine#mongomallard). I'll try to move the performance improvements (including this one) over to this package.

PS GitHub has added reactions to their UI now (https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments) so that we don't need to create "+1" comments.

All 16 comments

Has anybody started this?

I havent started 0.9 development yet

Just to let you know, I'm interested in this feature as well.

+1 for this

Is 0.9 still in the works or is mongoengine stalled?

+1 This would be a great addition for things like uniqueness checks in a list of referenceField's

+1

Definitely a good optimization to have ! But I would rather release a 0.9 now and postpone this to a new release

And it might be a good idea to have #490 in mind while implementing the concept for this issue

Are we able to access a referencefield to obtain the ID & avoid the dereference overhead yet? Thanks.

+1

+1

+1

+1

We've implemented this (among many other things) in my company's fork of this package (https://github.com/closeio/mongoengine#mongomallard). I'll try to move the performance improvements (including this one) over to this package.

PS GitHub has added reactions to their UI now (https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments) so that we don't need to create "+1" comments.

This is very needed update. Is there any progress on this one? (Also wonder if it would be possible to check whether field is a reference proxy like it was possible to check via isinstance(field, DBRef)?)

+1

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ajdas-code picture ajdas-code  路  4Comments

BenCoDev picture BenCoDev  路  5Comments

kevin0571 picture kevin0571  路  3Comments

MateuszBelczowski picture MateuszBelczowski  路  4Comments

knoxxs picture knoxxs  路  3Comments