title: Insert/Update of XMLType with JPA
body: <p>I have an oracle database with a column with XMLType. I have implemented a DescriptorCustomizer for it and I am using XMLType as my field type in the Entity. </p>
  
  <p>Essentially I have:</p>
  
  <pre><code>@Entity
  @Customizer(XmlCustomizer.class) 
  public class ...... {
      .....
  private XMLType xmlColumn;
      .....
  }
  </code></pre>
  
  <p>This all works great for reading data from the database. But when it comes to persisting the data I am not sure what to do. I haven't found an easy way to create an XMLType object with xml in it. Most of the methods seem to ask for a connection which is pretty ugly. So what is it that I am missing or misunderstanding? </p>
  
  <p>Thanks.</p>
  
  <p>EDIT: I forgot to mention that I do have it working with XMLType but like I said I have to pass a connection to the database which I can get from my EntityManager. Seems ugly though.</p>