Removed clearing the persistence context and detached entity instead.