Hi Richter,
Edson Carlos Ericksson Richter wrote:
Hi!
I discovered an interesting (bug?) behaviour in OJB 1.0.3.
I am using auto-commit false for every connection.
When I store an object that has an list with cascade all, but one object
in the list fail to store, then I got "Primary Key violation - attempt
to insert duplicate key on PRIMARY_TABLE" (where PRIMARY_TABLE is table
name of object I asked to store).
I don't know why OJB is trying to insert object twice (insert main
object with newly generated value, insert child object with error, try
to insert main object again but with value already defined, causing PK
violation) when error occured, but it is. Since my object is
auto-numbered, first attemp it get one value from sequence (procedure),
second attemp, since object already has key defined, it tries to just
insert, causing duplicate key.
I don't know if it was clear, but this is what is happening.
Could you please run your test against latest version from SVN
(OJB_1_0_RELEASE branch)? If the problem still happen, please open a bug
report in JIRA (if possible with unit test or modified existing test in
test-suite or pseudo code example to reproduce the bug).
regards,
Armin
Thanks,
Richter
------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]