openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (OPENJPA-296) UUID algorithm generating non-unique values sometimes
Date Wed, 25 Jul 2007 18:01:31 GMT

     [ https://issues.apache.org/jira/browse/OPENJPA-296?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Patrick Linskey resolved OPENJPA-296.
-------------------------------------

    Resolution: Fixed

Resolved with r559540.

> UUID algorithm generating non-unique values sometimes
> -----------------------------------------------------
>
>                 Key: OPENJPA-296
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-296
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 0.9.0, 0.9.6, 0.9.7
>            Reporter: Patrick Linskey
>             Fix For: 1.0.0
>
>
> From the dev list:
> @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.

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


Mime
View raw message