-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Clarification
PostPosted: Thu Sep 11, 2003 8:08 pm 
Regular
Regular

Joined: Wed Sep 03, 2003 9:56 pm
Posts: 58
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)



Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 11, 2003 9:37 pm 
Pro
Pro

Joined: Tue Aug 26, 2003 8:07 pm
Posts: 229
Location: Brisbane, Australia
Check out this topic, it might provide a little more info:
http://forum.hibernate.org/viewtopic.ph ... highlight=


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 11, 2003 10:54 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Once within the _session_, of course. Just like the message says. Please check the first page of the Hibernate documentation.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.