Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror

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

by mixmasterjake (#19818699) Attached to: Canonical Begins To Open-Source Launchpad
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.

Man will never fly. Space travel is merely a dream. All aspirin is alike.

Working...