title: JPA using multiple database schemas
body: <p>I'm having a bit of trouble with one particular issue using JPA/Spring:</p>
  
  <p>How can I dynamically assign a schema to an entity?</p>
  
  <p>We have TABLE1 that belongs to schema AD and TABLE2 that is under BD.</p>
  
  <pre><code>@Entity
  @Table(name = "TABLE1", schema="S1D")
  ...
  
  @Entity
  @Table(name = "TABLE2", schema="S2D")
  ...
  </code></pre>
  
  <p>The schemas may not be hardcoded in an annotation attribute as it depends on the environment (Dev/Acc/Prd).  (In acceptance the schemas are S1A and S2A) </p>
  
  <p>How can I achieve this?  Is it possible to specify some kind of placeholders like this:</p>
  
  <pre><code>@Entity
  @Table(name = "TABLE1", schema="${schema1}")
  ...
  
  @Entity
  @Table(name = "TABLE2", schema="${schema2}")
  ...
  </code></pre>
  
  <p>so that schemas are replaced based on a property file residing in the environment?</p>
  
  <p>Cheers</p>