Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make reference fields a proxy to allow access to field.id without dereferencing #298

Open
rozza opened this issue Apr 26, 2013 · 16 comments

Comments

@rozza
Copy link
Contributor

rozza commented Apr 26, 2013

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

refs: #61

@thedug
Copy link

thedug commented Nov 25, 2013

Has anybody started this?

@rozza
Copy link
Contributor Author

rozza commented Nov 28, 2013

I havent started 0.9 development yet

@Fraggle
Copy link

Fraggle commented Mar 3, 2014

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

@lwcolton
Copy link

+1 for this

@thedug
Copy link

thedug commented Nov 13, 2014

Is 0.9 still in the works or is mongoengine stalled?

@bsherry
Copy link

bsherry commented Nov 15, 2014

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

@bond777
Copy link

bond777 commented Nov 20, 2014

+1

@MRigal
Copy link
Member

MRigal commented Dec 12, 2014

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

@MRigal
Copy link
Member

MRigal commented Dec 12, 2014

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

@smcclstocks
Copy link

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

+1

@computmaxer
Copy link

+1

@codekiln
Copy link

+1

1 similar comment
@pchristos
Copy link

+1

@wojcikstefan
Copy link
Member

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.

@mclate
Copy link

mclate commented Jun 19, 2017

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)?)

@djrochford
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests