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

Batch updates aren't where it ends. As a Django developer with a strong SQL background I find my hands are tied far more often than I would like. Sometimes this is caused by bugs like the current group by bug[1], other times it's caused by the design of the ORM.

I do agree that the ORM is handy for things like "Get me all the things in this table", and "update this single record using a form", but this author is dead on. There is logical reason behind the hate developers have for ORMs.

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



Django's ORM is a piece of junk compared to a proper one such as SQLalchemy, hibernate or nhibernate. I wouldn't go drawing conclusions until you've experienced something else.


I unfortunately have to agree wholeheartedly

Sure, if you're doing a simple CMS, a simple system (even with Django Auth), Django ORM is fine

If you have anything slightly complex (several relationships between models) watch it fall apart


If Hibernate is one of the "proper" ones, then I can happily declare ORMs to be a non-working, time-wasting, over-complicated POS.


Your post is of limited value. What, in particular, are the issues that you have with Hibernate?


What in particular is it about my question that caused it to be voted down? I'm actually very interested in hearing the issues that the responder is having with Hibernate. Unfortunately, because they haven't stated what it is that caused them so many problems, it's of very limited value to the discussion being had.


I voted you back up. I'm slightly concerned that the down vote was simply retaliatory against the norm which appears to be Common here.

I too would like to understand.


I don't know about the django ORM, however for some other modern ORM's batch operations and statement reordering are one of the top ORM benefits. If you are developing a set of API's that you have no idea how they'll be consumed, the combination of declarative transactions and heuristically optimized ORM based reordered statements + batch updates gives you easy to understand code, proper transaction semantics and really good performance. Without the ORM + declarative transactions you may end up writing ugly apis that pass transactions or connections around and you'll end up having a major task of optimizing the database interactions. Learn your tool, use it for the right use cases and you'll be happy. Putting your left shoe on the right foot will always feel wrong.




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

Search: