title: How to compute @MetaValue's entityTarget from value in Hibernate's @Any?
body: <p>I have implemented a solution similar to:
  <a href="https://stackoverflow.com/questions/217831/how-to-use-hibernate-any-related-annotations">How to use Hibernate @Any-related annotations?</a>, and it's getting out of hand - I have too many mappings which have similar mapping "scheme":</p>
  
  <pre><code>@Any(metaColumn = @Column(name = "something_type"), fetch = FetchType.LAZY)
  @AnyMetaDef(idType = "long", metaType = "string", metaValues = {
      @MetaValue(value = "A", targetEntity = AImpl.class),
      @MetaValue(value = "B", targetEntity = BImpl.class),
      @MetaValue(value = "C", targetEntity = CImpl.class),
      @MetaValue(value = "D", targetEntity = DImpl.class),
      @MetaValue(value = "E", targetEntity = EImpl.class),
      etc..  })
  public BaseSomething getRelatedSometing() {
      return relatedSometing;
  }
  </code></pre>
  
  <p>I've tried to keep a value (e.g. "A") that can be computed to a target (e.g. "AImpl").
  Is there a way to avoid listing all the implementation by hand, but still keep hibernate happy?</p>