[hibernate-issues] [Hibernate-JIRA] Created: (HHH-2675) Session.contains() always return false

Mohammad Shoaib Ashrafi (JIRA) noreply at atlassian.com
Sun Jun 17 06:48:52 EDT 2007


Session.contains() always return false
--------------------------------------

                 Key: HHH-2675
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2675
             Project: Hibernate3
          Issue Type: Bug
          Components: build
    Affects Versions: 3.1.3
         Environment: JDK1.5, Tomcat6.0 Hibernate 3, Windows XP
            Reporter: Mohammad Shoaib Ashrafi


i have two class (User and Role) with hibernate one-to-one mapping
in runtime i load the user object after this i create the new user object with same primary key as loaded object
and when i call session.update(newUser) then it throws NonUniqueObjectException so i added some statement before update 

if( session.contains(userObject) ){
  session.evict(userObject)
}
session.update(userObject)

but the problem is here that session.contains(userObject) always return false

kindly resolved this issue and give the chance of thanks

Regards
Mohammad Shoaib Ashraif



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list