
| Key: |
OPENJPA-296
|
| Type: |
Bug
|
| Status: |
Resolved
|
| Resolution: |
Fixed
|
| Priority: |
Major
|
| Assignee: |
Unassigned
|
| Reporter: |
Patrick Linskey
|
| Votes: |
0
|
| Watchers: |
0
|
|
If you were logged in you would be able to see more operations.
|
|
|
| Resolution Date: |
25/Jul/07 06:01 PM
|
|
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.
|
|
Description
|
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. |
Show » |
| There are no subversion log entries for this issue yet.
|
|