Re: How to batch INSERT .. ON DUPLICATE operations

2011-07-13 Thread Marc O'Morain
That worked great. Thanks for the help. On Wednesday, July 13, 2011, Marc O'Morain wrote: > HiĀ Andrus, > > Thanks for the quick reply. I'm going to read those docs, and give your > suggestion a go. I'll let you know how I get on. > Marc > On Wed, Jul 13, 2011 at 8:31 PM, Andrus Adamchik > wrot

Re: How to batch INSERT .. ON DUPLICATE operations

2011-07-13 Thread Marc O'Morain
Hi Andrus, Thanks for the quick reply. I'm going to read those docs, and give your suggestion a go. I'll let you know how I get on. Marc On Wed, Jul 13, 2011 at 8:31 PM, Andrus Adamchik wrote: > > Hi Marc, > > first a small clarification - dataContext.commitChanges() commits objects in that con

Re: How to batch INSERT .. ON DUPLICATE operations

2011-07-13 Thread Andrus Adamchik
Hi Marc, first a small clarification - dataContext.commitChanges() commits objects in that context. Since all your changes are done with SQLTemplates, it probably does nothing. I.e. DataContext itself is a "disconnected" object, and by default each operation is wrapped in its own transaction au

How to batch INSERT .. ON DUPLICATE operations

2011-07-13 Thread Marc O'Morain
Hi there, I have an application that needs to perform a lot (~4000) of "INSERT .. ON DUPLICATE ..." operations to a MySQL databases. My Java code looks like this: long id = ; long time = ; DataContext dataContext = .; dataContext.performNonSelectingQuery(new SQLTemplate(LiveEvent.cla