From: Graeme Wallace Date: November 21 2012 9:12pm Subject: Help with ClusterJ List-Archive: http://lists.mysql.com/cluster/8431 Message-Id: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b3440c6834f9904cf07d0d3 --047d7b3440c6834f9904cf07d0d3 Content-Type: text/plain; charset=ISO-8859-1 I have a stream of data that i'm trying to persist into a cluster using ClusterJ and I'm running into problems. For each ASCII record that i receive, I'm parsing into Java primitives then setting the fields on a Java representation that i've gotten via Session.newInstance() what i would really like to do then is to call session.savePersistent() so that if the primary key already exists in the db the row gets updated, and if the primary key doesnt exist a new row gets created. Unfortunately, this doesnt work as I get an exception back if the primary key already exists. Is there a way around this without having to do a session.find() on the primary key and then updating the fields on the object returned ? The volume of data that I'm trying to insert is quite large (hundreds of millions of records) and this would seem like a significant overhead if i had to do a session.find() for every record. -- Graeme Wallace CTO FareCompare.com O: 972 588 1414 M: 214 681 9018 --047d7b3440c6834f9904cf07d0d3--