title: Wrap column names in double quotes in Hibernate
body: <p>I'm using Spring JPA 2.0.9 with Hibernate 5.3.5 and <a href="https://github.com/johnkeates/hibernate-filemaker-dialect" rel="noreferrer">this dialect</a> to access a FileMaker (v16) database via JDBC using the official JDBC driver taken from this <a href="https://support.filemaker.com/s/answerview?language=en_US&amp;anum=12921" rel="noreferrer">distribution</a>.</p>
  
  <p>The thing is that the resulting SQL ends up being with column names prefixed by the respective table names like:</p>
  
  <pre><code>select 
  marketingc0_.a__IDPK_MarketingCategory as a__IDPK_1_0_0_, marketingc0_.Active as Active2_0_0_
  from MarketingCategories as marketingc0_
  where marketingc0_.a__IDPK_MarketingCategory=1
  </code></pre>
  
  <p>which FileMaker doesn't accect complaining about the wrong syntax:</p>
  
  <blockquote>
    <p>[08007][27034] [FileMaker][FileMaker JDBC] FQL0001/(1:153): There is
    an error in the syntax of the query.</p>
  </blockquote>
  
  <p>However it gulps down the SQL without complains if the column names are wrapped in double quotes like this:</p>
  
  <pre><code>select
      marketingc0_."a__IDPK_MarketingCategory" as a__IDPK_1_0_0_, marketingc0_."Active" as Active2_0_0_
      from MarketingCategories as marketingc0_
      where marketingc0_.a__IDPK_MarketingCategory=1
  </code></pre>
  
  <p>The solution I've come up with is including these quotes into the entity annotations:</p>
  
  <pre><code>public class MarketingCategory {
      @Id
      @Column(name = "\"a__IDPK_MarketingCategory\"")
      private Integer id;
  
      @Column(name = "\"a_ID_User\"")
      private Integer userId;
  
      @Column(name = "\"Active\"")
      private Boolean active;
  
  ...
  }
  </code></pre>
  
  <p>which doesn't look good. </p>
  
  <p>Is it possible configure Hibernate so that it would wrap all the column names in double quotes automatically?</p>