Classes:
public class EntityClass
{
        public virtual long Id { get; set; }
        public virtual string Name { get; set; }
        public virtual DateTime ActualFrom { get; set; }
        public virtual string UserName { get; set; }
}
public class ProjectionClass
{
        public virtual long Id { get; set; }
        public virtual string Name { get; set; }
}
Mapping:
public class EntityClassMap : ClassMap<EntityClass>
{
        public EntityClassMap()
        {
                Id(x => x.Id);
                Map(x => x.Name);
                Map(x => x.ActualFrom);
                Map(x => x.UserName);
        }
}
public class ProjectionClassMap : ClassMap<ProjectionClass>
{
        public ProjectionClassMap()
        {
                ImportType<ProjectionClass>().As("Projection");
        }
}
Exception:
  * Database was not configured through Database method.
 ---> FluentNHibernate.Visitors.ValidationException: The entity
'ProjectionClass' doesn't have an Id mapped. Use the Id method to map
your identity property. For example: Id(x => x.Id).

Can help?

-- 
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To post to this group, send email to fluent-nhibern...@googlegroups.com.
To unsubscribe from this group, send email to 
fluent-nhibernate+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/fluent-nhibernate?hl=en.

Reply via email to