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

using sort operations like order_by, latest, etc. #5

Open
benkank opened this issue Jan 17, 2011 · 1 comment
Open

using sort operations like order_by, latest, etc. #5

benkank opened this issue Jan 17, 2011 · 1 comment

Comments

@benkank
Copy link

benkank commented Jan 17, 2011

Looking at your code and doing some testing it appears sorting querysets with eav attributes using operations like order_by isn't supported. If it isn't supported, can you recommend a technique for getting around this limitation short of bringing everything into memory and sorting it their?

@ksamuel
Copy link

ksamuel commented Jan 20, 2011

Hello benkank . Sorry for responding so late, we have created Django EAV for our own use and never though sombody else would ask about it :-)

Unfortunetly, there is no way to do that. We currently bring everything in memory and sort it here ourself. Django EAV is not made for performance but for flexibility. You should heavily cache everything you query from it.

We know it's a big limitation, but again, we didn't create it with a 'fit-all' purpose in mine. We are even surprised that people are trying to using it :-)

But this is an open source project and you are welcome to make a pull request with a patch of an implementation of any suggestions you would have to improve this. We will need unit tests to back up it as the code base is already pretty complex and it's easy to miss a bug in there.

Cheers,

Kevin

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

No branches or pull requests

2 participants