title: Bypass GeneratedValue in Hibernate (merge data not in db?)
body: <p>My problem is the same as described in <a href="https://stackoverflow.com/questions/89439/bypass-generatedvalue-in-hibernate">[1]</a> or <a href="https://stackoverflow.com/questions/2108178/id-generatedvalue-but-set-own-id-value">[2]</a>. I need to manually set a by default auto-generated value (<em>why? importing old data</em>). As described in <a href="https://stackoverflow.com/questions/89439/bypass-generatedvalue-in-hibernate">[1]</a> using Hibernate's <code>entity = em.merge(entity)</code> will do the trick.</p>
  
  <p>Unfortunately for me it does not. I neither get an error nor any other warning. The entity is just <strong>not going to appear in the database</strong>. I'm using Spring and Hibernate EntityManager 3.5.3-Final.</p>
  
  <p>Any ideas?</p>