> class Foo extends LongKeyedMapper[Foo] with IdPK {
> def getBazes = {
> Baz.findAll(In(Baz.barid, Bar.id, By(Bar.fooid, this)))
> }
OK, upgrading to 1.1-M4 got rid of the NPE so I'm just gonna assume
there was a bug that has been fixed. However the SQL query that lift
is generating is no good. It's doing something like this:
SELECT bazes.cityid, bazes.xdatetime, bazes.aliasid, bazes.userid,
bazes.id FROM bazes WHERE barid IN (SELECT id FROM bars WHERE fooid =
22120 );
which is WAY WAY more inefficient than this (by a factor of like
100x):
SELECT bazes.cityid, bazes.xdatetime, bazes.aliasid, bazes.userid,
bazes.id FROM bazes, bars WHERE bazes.barid = bars.id AND bars.fooid =
22120;
At least on MySQL (which is what I'm using). Is there any way to get
Lift to use a query like the latter instead of the former?
-harryh
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Lift" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---