0 Replies Latest reply on Jun 9, 2005 5:02 AM by shmendrick

    Problems using entity manager find method

    shmendrick

      Hi,
      I'm trying to get one object using - manager.find(MyClass.class, myPK), But I get the following Exception:

      org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session:

      I have tried with manager.flush() before manager.find() but it didn't help.
      How can I get the object with that PK(myPK).I don't care if the AS returns this object form the cache or from the DB, I just wan't to get it.

      Thanks