title: storing key value pairs in hibernate | can we use map?
body: <p>I have a xml file and within which i have some key value pairs.I want to store them in form of key value pairs</p>
  
  <pre><code>&lt;parent&gt;
    &lt;key1&gt; value &lt;/1key&gt;
    &lt;key1&gt; value &lt;/1key&gt;
    &lt;key1&gt; value &lt;/1key&gt;
    &lt;key1&gt; value &lt;/1key&gt;
     ...
    &lt;key1&gt; value &lt;/1key&gt;
  &lt;/parent&gt;
  </code></pre>
  
  <p>Now i dont know how many key value will be coming from xml in advance.How can i map it to hibernate object?
  i can stor it in table in</p>
  
  <pre><code>primaryKey parentId    key   value
     1          1         k1     val
     2          1         k2     val
     3          1         k3     val
     4          2         k1     val
     5          2         k2     val
     6          3         k3     val
  </code></pre>
  
  <p>How can i map it to hibernate object?
  I want following structure
  class Parent{
    int parentId;
    String parent Name
    KeyValue keyval ; //How do i model it?</p>
  
  <p>}</p>
  
  <p>AM using netbeans IDE.</p>