Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 280 invoked from network); 25 Jul 2007 14:12:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Jul 2007 14:12:32 -0000 Received: (qmail 9149 invoked by uid 500); 25 Jul 2007 14:12:32 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 9120 invoked by uid 500); 25 Jul 2007 14:12:32 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 9110 invoked by uid 99); 25 Jul 2007 14:12:32 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jul 2007 07:12:32 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [66.249.82.226] (HELO wx-out-0506.google.com) (66.249.82.226) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jul 2007 07:12:30 -0700 Received: by wx-out-0506.google.com with SMTP id s7so186717wxc for ; Wed, 25 Jul 2007 07:12:09 -0700 (PDT) Received: by 10.90.105.20 with SMTP id d20mr481482agc.1185372728904; Wed, 25 Jul 2007 07:12:08 -0700 (PDT) Received: from ?192.168.1.116? ( [24.218.71.173]) by mx.google.com with ESMTPS id 67sm820473wra.2007.07.25.07.12.07 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 25 Jul 2007 07:12:07 -0700 (PDT) Message-ID: <46A75A37.6000202@torrez.us> Date: Wed, 25 Jul 2007 10:12:07 -0400 From: Elias Torres User-Agent: Thunderbird 1.5.0.12 (Windows/20070509) MIME-Version: 1.0 To: dev@openjpa.apache.org Subject: uuid-string not generating unique ids X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi, First off, I want to say thank you for the hard work this community has put on this JPA implementation. I'm extremely eager in getting to know it better and hopefully put it to good use in some of the projects I'm currently working on at IBM. If all goes well, I'll be asking some of the harder questions later and possibly discuss new features not currently implemented. Now if you could please help me out with a small issue I'm having with uuid generation. @Entity public class Foo { @Id @GeneratedValue(strategy=GenerationType.AUTO, generator="uuid-string") private String id; } CREATE TABLE Foo ( id VARCHAR(16) NOT NULL } If I do one em.persist() it works just fine. However, if I do a a whole list of them, I get exceptions (duplicate). If I enable logging I can see they are all using the same id during INSERT. I stepped a bit through the code and noticed that uuid-string doesn't get generated while em.persist(), but much later while committing/flushing. I then looked a bit (just a bit) at the UUID generator code and noticed that the bytes are not changing much (maybe only the first two), but again, that was while debugging, so I'm assuming I have a supa-fast machine. Anybody running into the same problem? Any suggestions? -Elias