Based on this exception (See below), am I correct in assuming that an entity (row) can exist only once within the JVM?
Can someone clarify this for me?
I produced this exception by creating a mapped Java object (Permission), saving that object, then attempting to load that object back into a different Permission object.
TIA
-Mitch
Code:
net.sf.hibernate.HibernateException: The object with that id was already loaded by the Session: [com.informatixinc.rapid.model.security.Permission#2263]
at net.sf.hibernate.impl.SessionImpl.doLoadByObject(SessionImpl.java:1736)
at net.sf.hibernate.impl.SessionImpl.load(SessionImpl.java:1683)
at com.informatixinc.rapid.model.security.test.PermissionTest.testAdd(PermissionTest.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:392)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:276)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:167)