title: Get auto increment key in scalaquery
body: <p>I want to insert rows in 2 tables which represent a 1:n relationship using scalaquery / slick.</p>
  
  <p>The tables are defined as follows:</p>
  
  <pre><code>object CompanyBaseTable extends Table[CompanyBaseTableEntry]("company") {
    def id = column[Int]("id", O PrimaryKey, O AutoInc)
  }
  
  object ProductCatalogueTable extends Table[ProductCatalogueEntry]("product_catalogue") {
   def cid = column[Int]("id", O NotNull)
   def pid = column[Long]("pid", O NotNull)
   def company = foreignKey("company_fk", cid, CompanyBaseTable)(_.id)
  }
  </code></pre>
  
  <p>I want to insert the 1:n relation within one transaction but I don't know how I can achieve that using ScalaQuery. In JDBC 3 you can get the generated ID from the <a href="https://stackoverflow.com/questions/2853066/sql-java-get-value-assigned-to-auto-increment-primary-key">statement</a>, but I don't see where the statement is exposed in the ScalaQuery API, neither do I see a way to access this information directly.</p>