On Mar 31, 3:12 am, Johnathan <[email protected]> wrote: > Jeremy, > > many thanks for your advice. Things seem to work okay by overriding > _insert method. > > Noticed one interesting side-effect, though: if the query is correct, > everything goes well. When the query fails, however, Sequel calls the > database six times: three times trying to select * from [failed query] > and two more times re-running the failed query. Could not figure out > what was causing that, or how to go about preventing it. > > Here's the code and the output: > > http://pastie.org/1738735
The select calls are Sequel attempting to reload the database row to get the values of all of the columns. You could use the skip_create_refresh plugin to avoid that. As to why it's calling things three times, I'm not sure. Can you use an Sequel logger (DB.loggers << Logger.new($stdout)) to see if that is something Sequel is doing, or if it's something done by a lower level that Sequel doesn't have control over? Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" 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/sequel-talk?hl=en.
