title: NHibernate: how to set Id that is a property in component
body: <p>I want to set (via Fluent NHibernate) an Id to be generated: assigned.
  The mapped Id is a property which contained in a component inside the entity as follows:</p>
  
  <pre><code>public class Group
  {
      public Group()
      {
      }
  
      public Group(GroupIdentifier identifier)
      {
         GroupIdentifier = identifier;
      }
  
      [DataMember]
      public virtual GroupIdentifier GroupIdentifier { get; set; }
  
      [DataMember]
      public virtual IList&lt;X&gt; Objects { get; set; }
  }
  
  public class GroupIdentifier
  {
      protected ProtectionGroupIdentifier()
      {
      }
  
      [DataMember]
      public virtual Guid GroupGuid 
      { get; set; }
  
  }
  </code></pre>
  
  <p>I use the following code to define the entity id:</p>
  
  <pre><code>.Override&lt;Group&gt;(obj =&gt; obj.Id(x =&gt; x.GroupIdentifier.GroupGuid).GeneratedBy.Assigned())
  </code></pre>
  
  <p>When I try to Save entity I get the following error:
  threw exception. NHibernate.PropertyNotFoundException: NHibernate.PropertyNotFoundException: Could not find a getter for property 'GroupGuid' in class...</p>
  
  <p>If I move GroupGuid to Group Entity and set Id - it's working.
  But I need it in GroupIdentifier component.
  Please advise.</p>