On Mon, Sep 14, 2009 at 3:56 PM, Derek Chen-Becker <dchenbec...@gmail.com>wrote:
> With my own project using the new logging code that I just committed, I > don't see dup queries. This is against 1.1-SNAPSHOT, so I don't know if > there's a bug in 1.0, but I would think that if things were really happening > twice then inserts and updates would be broken. > The SQL is not being sent twice. There are two different points (when the Statement is created and after the Statement is executed) that the same query is logged. > > Derek > > > On Mon, Sep 14, 2009 at 2:30 PM, tiro <tim.romb...@googlemail.com> wrote: > >> >> Dear all, >> >> on every findAll request, lift seems to send the query twice (tested >> 1.0 and 1.0.2, working from the PocketChangeApp example on h2database, >> and using >> DB.addLogFunc((query, time) => >> Log.info(query + ":" + time + "ms"))) >> >> for logging >> >> 1. e.g. right after login; this must be framework code (ProtoUser): >> >> INFO - prep91: SELECT users.firstname, users.lastname, users.email, >> users.locale, users.timezone, users.password_pw, use >> rs.password_slt, users.superuser, users.validated, users.uniqueid, >> users.id FROM users WHERE email = ? {1: 't...@rombe >> rg.be'};:14ms >> INFO - prep91: SELECT users.firstname, users.lastname, users.email, >> users.locale, users.timezone, users.password_pw, use >> rs.password_slt, users.superuser, users.validated, users.uniqueid, >> users.id FROM users WHERE email = ? {1: NULL};:65ms >> >> same on practically all other statements >> >> 2nd example: >> >> INFO - prep110: SELECT DISTINCT resourcestopics.resourcetype, >> resourcestopics.resourceid, resourcestopics.topicid FROM >> resourcestopics WHERE resourcetype = ? AND resourceid = ? {1: 2, >> 2: 3};:0ms >> INFO - prep110: SELECT DISTINCT resourcestopics.resourcetype, >> resourcestopics.resourceid, resourcestopics.topicid FROM >> resourcestopics WHERE resourcetype = ? AND resourceid = ? {1: >> NULL, 2: NULL};:27ms >> INFO - Service request (POST) /editProject.html took 748 Milliseconds >> >> my code: findAll(By(ResourcesTopics.resourceType, resourceType), By >> (ResourcesTopics.resourceId, resourceId)) >> >> >> Is this desired behavior? Am only I seeing this? It also seems that >> the "useless" query takes much more time than the "real" query.. >> >> Tried to compare with one of the most recent milestone (1.1-M5) but >> this one only throws exceptions on me, starting from boot, so I >> suppose there have been too many changes I am not aware of. >> >> >> Thanks, >> >> Tim >> >> >> > > > > -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@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 -~----------~----~----~----~------~----~------~--~---