3 Replies Latest reply on Jan 12, 2007 2:35 PM by Bää Thur

    Simple remove wont work. Detached instance

    Bää Thur Newbie

      Hi, Im uable to remove an object/post from database by using EntityManager.remove(). The console says Removing a detached instance. But post remainsin db. Is it even possible to remove a detached object? Im not getting why its detached, my code is simple.

      User user = (User) service.getUserById(34);
      service.deleteUser(user);
      


      where would my session/EntityManager be lost?

      Thanks for your time.