title: DynamoDB and TableNameOverride with prefix
body: <p>I am testing DynamoDB tables and want to set up different table names for prod and dev environment using the prefix "dev_" for development.</p>
  
  <p>I made this test to print the table name:</p>
  
  <pre><code>import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBMapperConfig.TableNameOverride;  
  
  TableNameOverride tbl = new TableNameOverride("test").withTableNamePrefix("dev_");
  System.out.println("name=" + tbl.getTableName() + "  prefix=" + tbl.getTableNamePrefix());
  </code></pre>
  
  <p>This prints: <code>name=null  prefix=dev_</code><br>
  <strong><em>How come the name here is null ?</em></strong></p>
  
  <pre><code>TableNameOverride tbl = new TableNameOverride("test");//.withTableNamePrefix("dev_");
  System.out.println("name=" + tbl.getTableName() + "  prefix=" + tbl.getTableNamePrefix());
  </code></pre>
  
  <p>This prints: <code>name=test  prefix=null</code></p>
  
  <p>*<strong>How can I get the table name to be "dev_test" ?*</strong></p>
  
  <p>I want to use this later to get a "dev_" prefix for all tables in development mode like this:</p>
  
  <pre><code>DynamoDBTable annotation = (DynamoDBTable) myclass.getClass().getAnnotation(DynamoDBTable.class);  
  TableNameOverride tbl = new TableNameOverride(annotation.tableName()).withTableNamePrefix("dev_");
  </code></pre>
  
  <p>Or is there another solution to separate between dev and prod tables?<br>
  I first thought of putting them in separate regions but not sure about this.</p>
  
  <p>Could also use this:</p>
  
  <pre><code>mapper.save(ck, new DynamoDBMapperConfig(new TableNameOverride((isDev ? "dev_" : "") + annotation.tableName())));
  </code></pre>