title: OpenJPA inserting into one table data from another table
body: <p>I am new to <code>OpenJPA</code><br>
  I am trying to insert data into a table some of which comes from another table. Below is the scenario.   </p>
  
  <pre><code>Table1: id, app_name, app_version, app_active  
  
  Table2: id, app_name, app_version, dev_name, dev_Lastname, dev_shortname,
  
  Pojo1 maps fields to column of table1  
  Pojo2 maps fields to column of table2
  </code></pre>
  
  <p>Query: </p>
  
  <pre><code>insert into table2 ("dev_name","dev_lastname","dev_shortname") select t1.app_name, t1.app_version from Table1 t1 where t1.app_name = ?
  </code></pre>
  
  <p>i dont know how to run this query using <strong><code>Openjpa</code></strong> and how to map these fields to each other in two pojos. 
  if I use the <code>Query object</code> then what about the <strong><code>pojos</code></strong>?? will they come in use?? I mean will i need to do <strong><code>transaction.save</code></strong>??  </p>
  
  <p>Any help with a sample code appreciated.</p>