mirror of https://github.com/apache/openjpa.git
Be a little more flexible on the exceptions thrown when persisting instances
with auto-generated keys already assigned values. git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@645610 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9c19356c7c
commit
ea8b942364
|
@ -19,6 +19,7 @@
|
|||
package org.apache.openjpa.persistence.generationtype;
|
||||
|
||||
import javax.persistence.EntityManager;
|
||||
import javax.persistence.EntityExistsException;
|
||||
|
||||
import org.apache.openjpa.persistence.InvalidStateException;
|
||||
import org.apache.openjpa.persistence.test.SingleEMFTestCase;
|
||||
|
@ -59,7 +60,10 @@ public class TestGeneratedValues extends SingleEMFTestCase {
|
|||
} catch (InvalidStateException ise) {
|
||||
// expected result
|
||||
return;
|
||||
}
|
||||
} catch (EntityExistsException eee) {
|
||||
// also ok
|
||||
return;
|
||||
}
|
||||
|
||||
// should not get here...
|
||||
fail();
|
||||
|
@ -78,7 +82,10 @@ public class TestGeneratedValues extends SingleEMFTestCase {
|
|||
} catch (InvalidStateException ise) {
|
||||
// expected result
|
||||
return;
|
||||
}
|
||||
} catch (EntityExistsException eee) {
|
||||
// also ok
|
||||
return;
|
||||
}
|
||||
|
||||
// should not get here...
|
||||
fail();
|
||||
|
|
Loading…
Reference in New Issue