title: How to emulate "ON CONFLICT" PostgreSQL statement using JPQL
body: <p>I need to convert PostgreSQL native queries to JPQL. How the following two SQL statements can be translated:</p>
  
  <pre><code>INSERT INTO my_table (id, some_data) VALUES (?1,?2) ON CONFLICT (id) DO NOTHING;
  INSERT INTO other_table (id, other_data) VALUES (?1, ?2) ON CONFLICT DO UPDATE SET other_data = ?2
  </code></pre>
  
  <p>PostgreSQL ensures that each of the two statements will be executed atomically and will never fail due to conflict. How to archive the same functionality with JPA (EclipseLink)?</p>