title: How to map Hashtable component of a class, using JPA?
body: <p>I have this class:</p>
  
  <pre><code>public class DBRow {
      public String url;
      public String title;
      public static Hashtable&lt;String, Integer&gt; words;
      public Vector&lt;String&gt; keywords;
  }
  </code></pre>
  
  <p>What I must do is store many instances of this class in a database. I'm using Hibernate and JPA to get the job done. Using JPA I've come so far (really not far): </p>
  
  <pre><code>@Entity
  @Table(name="MAIN_TABLE")
  public class DBRow {
  
      @Column(name="url") 
      public String url;
      @Column(name="title")
      public String title;
      public static Hashtable&lt;String, Integer&gt; words;
      public Vector&lt;String&gt; keywords;
  
  }
  </code></pre>
  
  <p>I want my database to have 3 tables - MAIN_TABLE - auto-icremented id as primary key, url and title; HASH - containing a key-value pair from the <code>Hashtable&lt;String, Integer&gt;</code> and id to refer to which instance of <code>DBRow</code> class it belongs (and also to relate to the MAIN_TABLE); VECTOR - pretty much the same story like HASH but with a <code>Vector&lt;String&gt;</code>. So what I'm asking is hot to map the hashtable and the vector, using JPA to get it done?? I've been trying to find a way to do this but haven't found one so far... or maybe I'm not on the right way! Any suggestions are welcome. Thank you in advance. </p>