openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey (JIRA)" <>
Subject [jira] Created: (OPENJPA-296) UUID algorithm generating non-unique values sometimes
Date Wed, 25 Jul 2007 17:59:31 GMT
UUID algorithm generating non-unique values sometimes

                 Key: OPENJPA-296
             Project: OpenJPA
          Issue Type: Bug
          Components: sql
    Affects Versions: 0.9.7, 0.9.6, 0.9.0
            Reporter: Patrick Linskey
             Fix For: 1.0.0

>From the dev list:

public class Foo {

 @GeneratedValue(strategy=GenerationType.AUTO, generator="uuid-string")
 private String id;



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.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message