It used to be IN and then someone asked that it be changed to the current OR and they had a reasonable argument, so we changed it.
On Sun, Feb 28, 2010 at 11:17 PM, aw <anth...@whitford.com> wrote: > From reading Exploring Lift (Section 6.1, page 81), it says that > ByList corresponds to the “field IN (x,y,z)” syntax in SQL. > Well, that was what I needed, so I took it for a test drive. However, > instead of seeing SQL like: where some.id in (4, 9, 20) > I am seeing SQL like: where some.id = 4 or some.id = 9 or some.id = > 20. > > I double checked the latest code: > > http://github.com/dpp/liftweb/blob/master/framework/lift-persistence/lift-mapper/src/main/scala/net/liftweb/mapper/MetaMapper.scala > and it looks like there isn't a magical workaround to get IN working > as I expected. > > To me, this is a violation of SQL Tuning 101: as a rule of thumb, > prefer the IN clause over an OR clause. > > Is there a good reason why this code creates OR clauses instead of an > IN clause? > > -- > You received this message because you are subscribed to the Google Groups > "Lift" group. > To post to this group, send email to lift...@googlegroups.com. > To unsubscribe from this group, send email to > liftweb+unsubscr...@googlegroups.com<liftweb%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/liftweb?hl=en. > > -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.