[thelist] SQL replace subquery with join

Bill Moseley moseley at hank.org
Tue Jan 5 15:42:01 CST 2010

On Tue, Jan 5, 2010 at 1:29 PM, r937 <rudy at r937.com> wrote:

>  I actually started out with that approach but when doing that
>> the ORM is unable to do other things (like fetching multiple
>> related objects in a single query).
> i dunno what an ORM is, but why in the world would you use one if it is
> that retarded???

That quote I wrote above is a bit misleading.  The ORM can do joins and
convert the rows into multiple related objects and a bunch of other fun
things. Normally, the ORM creates the SQL including the JOIN statements, but
if you want to use additional constraints you can hand-craft the JOINs but
then the ORM can't do some of those fun things automatically.  It's a
trade-off, indeed.


Bill Moseley
moseley at hank.org

More information about the thelist mailing list