title: Hibernate - XML Mapping of a N<->N Table with extra columns
body: <p>I have this schema:</p>
  
  <pre><code>---------------  --------------------  ----------------
  | Customers   |  | CustomRoutePrice |  | Route        |
  |-------------|  |------------------|  ---------------|
  | CustId (pk) |  | CustId  (pk)     |  | RouteId (pk) |
  | Desc        |  | RouteId (pk)     |  | Desc         |
  ---------------  | Price            |  | Price        |
                   --------------------  ----------------
  </code></pre>
  
  <p>and I want to map the <code>CustomRoutePrice</code>'s Price to my <code>Customer</code>s POJO, saying something like:</p>
  
  <pre><code>Map&lt;Route, Double&gt; customRoutesPrices;
  </code></pre>
  
  <p>or maybe having a new POJO called <code>CustomRoute</code>, so it may look something like this:</p>
  
  <pre><code>public class CustomRoute {
      private Customer customer;
      private Route route;
      private Double price;
  }
  </code></pre>
  
  <p>so within my <code>Customer</code>s POJO I could have a set like:</p>
  
  <pre><code>Set&lt;CustomRoute&gt; customRoutes;
  </code></pre>
  
  <p>which may be the set of <code>CustomRoute</code>s for that <code>Customer</code>.</p>
  
  <p>So my question is how can I make possible both mappings?</p>
  
  <p>Thank you in advance.</p>