title: NHibernate: Map two collections to one table?
body: <p>I'm trying to create a parent entity (Policy) with two child-entity collections (ExpressionRules and ThresholdRules) where the types of the child-entities are the same and exist in the same table. For example:</p>
  
  <pre><code>class Policy
  {
      ICollection&lt;Rule&gt; ExpressionRules { get; set; }
      ICollection&lt;Rule&gt; ThresholdRules { get; set; }
  }
  
  class Rule
  {
      public virtual int SequenceNumber { get; set; }
      public virtual ICondition Condition { get; set; }
  }
  
  interface ICondition
  {
  }
  
  class ExpressionCondition : ICondition
  {
      public virtual string Expression { get; set; }
  }
  
  class ThresholdCondition : ICondition
  {
      public virtual int Threshold { get; set; }
  }
  </code></pre>
  
  <p>In practice each set of rules will have different ICondition implementers inside them. ICondition mappings have discriminators according to which the correct implementation is loaded. But the rules in the two sets are identical and I would like them to be mapped to the same table.</p>
  
  <p>Is this possible?</p>
  
  <p>(If you add mapping examples please use xml-mappings if possible.)</p>