title: jpa metamodel how to get table name
body: <p>Entity:</p>
  
  <pre><code>@Entity
  public class MyAccount {
  
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      private Integer id;
  
      private String userId;
  
      private String password;
  
      private String email;
  
      public Integer getId() {
          return id;
      }
  
      public void setId(Integer id) {
          this.id = id;
      }
  
      public String getUserId() {
          return userId;
      }
  
      public void setUserId(String userId) {
          this.userId = userId;
      }
  
      public String getPassword() {
          return password;
      }
  
      public void setPassword(String password) {
          this.password = password;
      }
  
      public String getEmail() {
          return email;
      }
  
      public void setEmail(String email) {
          this.email = email;
      }   
  }
  </code></pre>
  
  <p>Naming strategy:</p>
  
  <pre><code>public class HibernateNamingStrategy extends PhysicalNamingStrategyStandardImpl implements Serializable {
  
      private static final long serialVersionUID = -4772523898875102775L;
  
      @Override
      public Identifier toPhysicalTableName(Identifier name, JdbcEnvironment context) {
          return new Identifier(addUnderscores(name.getText()), name.isQuoted());
      }
  
      @Override
      public Identifier toPhysicalColumnName(Identifier name, JdbcEnvironment context) {
          return new Identifier(addUnderscores(name.getText()), name.isQuoted());
      }
  
      protected static String addUnderscores(String name) {
          final StringBuilder buf = new StringBuilder(name.replace('.', '_'));
          for (int i = 1; i &lt; buf.length() - 1; i++) {
              if (Character.isLowerCase(buf.charAt(i - 1)) &amp;&amp; Character.isUpperCase(buf.charAt(i))
                      &amp;&amp; Character.isLowerCase(buf.charAt(i + 1))) {
                  buf.insert(i++, '_');
              }
          }
  
          return buf.toString().toLowerCase();
      }
  }
  </code></pre>
  
  <p>JPA metamodel:</p>
  
  <pre><code>@Generated(value = "org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor")
  @StaticMetamodel(MyAccount.class)
  public abstract class MyAccount_ {
  
      public static volatile SingularAttribute&lt;MyAccount, String&gt; password;
      public static volatile SingularAttribute&lt;MyAccount, Integer&gt; id;
      public static volatile SingularAttribute&lt;MyAccount, String&gt; userId;
      public static volatile SingularAttribute&lt;MyAccount, String&gt; email;
  
  }
  </code></pre>
  
  <p>I am going to do something like below:</p>
  
  <pre><code>Join&lt;Employee,MyAccount&gt; project = emp.join("my_account", JoinType.LEFT);
  </code></pre>
  
  <p>I don't see any table name related attribute auto-generated in the <code>MyAccount_</code> metamodel. How can I use metamodel table name in the join criteria (I don't want to use hardcoded string)?</p>
  
  <p>PS: I am using Spring MVC and naming strategy which all camel case is separated by underscore.</p>