Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Oh right, fair point. When it comes to ORM/SQL generation I don't know of anything Rails does particularly better. Someone told me that in Rails you're more aware of when you're creating new joins. I think that might be useful. In this django query there's an elegance that can come from each call to .filter() or .exclude() making their own join, but it confuses people as well... and not being able to re-use the joins makes it impossible to do things like get around the lack of a 'not-equal' operator in some cases [1]:

Author.filter(books__page_count__gt=100).filter(books__deleted=False)

Really though, in this case I just wish Django would do better than it does now.. or at least better than it did in prior versions [2]. There's hope though, @akaarial appears to be kicking ass and taking names in this area lately.

[1]: https://code.djangoproject.com/ticket/5763

[2]: https://code.djangoproject.com/ticket/10790 and https://code.djangoproject.com/ticket/18785



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: