title: Can I override generated IDs?
body: <p>I'm using JPA 1, Hibernate and Oracle 10.2.0 and my entities are defined like this:</p>
  
  <pre><code>@Entity
  @Table(name="TERMS")
  public class Term implements Serializable {
      @Id
      @GenericGenerator(name = "generator", strategy = "guid", parameters = {})
      @GeneratedValue(generator = "generator")
      @Column(name="TERM_ID")
      private String termId;
  }
  </code></pre>
  
  <p>I have a situation where an XML representation of the Entity (and child entities) will be coming in through a web service to update/replace existing ones. My thought was to just delete the old ones and re-create it from the incoming XML.</p>
  
  <p>However, doing a persist when my entities having existing IDs seem to make Hibernate very angry. So is this actually possible or is it better to avoid deleting them and just trying to do it with merge?</p>
  
  <p>Angriness from hibernate:</p>
  
  <pre><code>org.hibernate.PersistentObjectException: detached entity passed to persist: com.idbs.omics.catalog.entity.Term
  </code></pre>
  
  <p>Thanks</p>