Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
For the out-of-band Slashdot experience (mostly headlines), follow us on Twitter, or Facebook. ×

Comment: Re:ORM == good (Score 1) 65 65

My personal feelings is that an ORM makes the easy stuff easier and the difficult more difficult. Dealing with aggregate queries, complex joins and huge datasets requires a good knowledge of the ORM and how it generates SQL. If you're used to having direct access to the DB, getting the ORM to do the proper magic can be frustrating.

This code you posted, though, would be bad regardless of using an ORM or not. I've seen the same thing using regular SQL to grab all the rows and then filtering them out in a code loop. This is just bad, un-scalable code in general. The right way to do this with an ORM is to just use it's expression or criteria functionality to do the filtering instead of grabbing all the records.

Getting the job done is no excuse for not following the rules. Corollary: Following the rules will not get the job done.

Working...