title: JPA (Hibernate) and custom table prefixes
body: <p>Is it possible to override table names in JPA/Hibernate in order to add a common prefix for all project entities? For instance to be able to prefix all JBPM 5 tables by "JBPM5_" prefix.</p>
  
  <p>Example for the accepted answer:</p>
  
  <pre><code>public class JBPM5NamingStrategy extends ImprovedNamingStrategy {
     public String classToTableName(String className) {
        return StringHelper.unqualify(className);
     }
     public String propertyToColumnName(String propertyName) {
        return propertyName;
     }
     public String tableName(String tableName) {
        return "JBPM5_" + tableName;
     }
     public String columnName(String columnName) {
        return columnName;
     }
     public String propertyToTableName(String className, String propertyName) {
        return "JBPM5_" + classToTableName(className) + '_'
           + propertyToColumnName(propertyName);
     }
  }
  </code></pre>