title: using hibernate, how to write @OneToMany(mappedBy="somethingFkId") in xml?
body: <p>does anyone know how to write <code>@OneToMany(mappedBy="customers")</code> in xml?</p>
  
  <p>I searched everywhere but didn't find anyone who write mappedBy in xml. I need to map one-to-many that mappedBy other column in other existing entity without creating new entity(like join table) or new collumn. I don't have the right to add another column or table. I know the way to do it is using hibernate anotation <code>@OneToMany(mappedBy="customers")</code>.</p>
  
  <p>But how to write it in xml? because my other project use java 1.4 that doesn't support annotation, so i can't use that <code>@OneToMany(mappedBy="customers")</code>.</p>
  
  <p>Something like this in java 1.6 :</p>
  
  <p>in table B:</p>
  
  <pre><code>@OneToMany(mappedBy="bId", cascade = CascadeType.DETACH)
  private Set&lt;AJoinB&gt; testJoins = new HashSet&lt;AJoinB&gt;();
  </code></pre>
  
  <p>in table AJoinB :</p>
  
  <pre><code>@Column(name = "B_ID", nullable = false)
  private Long bId;
  </code></pre>