Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Qchmqs5378y@h3ll the hate on orm is unjustified , i know it's not an all round solution, but when fit it can save a ton of time
-
Qchmqs5378ywhen i think orm i think of rails active record, rarely of doctrine, anyway if you're using an orm of complex queries you're doing it wrong
-
Heed the advice, no point in writing queries unless you're micro optimising and you're a some kind of DBA with a death wish. As a mortal programmer, don't touch the goddamn SQL and leave it for maintenance or pros.
And please use a sane Orm like active record, if you're still into hibernate is time to give your pension account a last couple of loving pats and cash out. -
First...
A possible solution is not an cure for everything - ORMs allow direct access to the database,so u can write raw sql and even update queries which then bypass the ORM.
Second...
Mistakes happen. There is a reason why backups exist. Not only for data recovery, but if u are afraid of an update query, take a backup, create an database with the same configuration, run and observe...
Problem solved.
Third...
For fucks sake stop proposing solutions like a moron - ORMs can make sense and can scale, as most of the time the ORM is the lesser problem, it is the dev who does not give fucks about database query and table design.
Best example is the still widespread usage of active row pattern and friends and people who translate n + 1 query problem with ORM without seeing that there is an fundamental difference between tool, implementation and usage. -
Qchmqs5378y@IntrusionCM you forgot the editing a live production database part of this moron fuckery
-
Not sure if I understand what u mean, but there is nothing wrong at all with editing a production database....
As long as u don't do it without preparation and a plan.
Otherwise, yes. Dumb idea. Very dumb. -
An interesting read if you get the time: Object-Relational Mapping is the Vietnam of Computer Science
https://blog.codinghorror.com/objec... -
@rusty-hacker thats actually a pretty good read. I guess my answer was a bit too arrogant. Thanks!
Related Rants
To all the people who complain about writing a delete or update query. Not to talk you down, but seriously. STOP WRITING RAW QUERIES AND USE AN ORM!
undefined
stop using raw
sql
orm saves lives