NHibernate requires that mapped classes have an <id ...> element. You
haven't created one with your mapping. Instead of Map(s =>
s.ReportID); you need Id(s => s.ReportID);.

On Tue, Jul 28, 2009 at 1:58 PM, Tomk<[email protected]> wrote:
>
>
> I'd like to map a view to a newly created entity. I'm only after
> getting the data, nothing more. The view has only two columns,
> ReportID and ThemeName.
>
> How should the mapping look?
>
> I now have this but throws an error: An invalid or incomplete
> configuration was used while creating a SessionFactory.
>
>    public class ThemeMap: ClassMap<Theme>
>    {
>        public ThemeMap()
>        {
>            Map(s => s.ReportID);
>            Map(s => s.ThemaName);
>        }
>    }
>
>    public class Theme
>    {
>        public virtual int ReportID { get; set; }
>        public virtual string ThemaName { get; set; }
>    }
>
> Thanks
> >
>

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

Reply via email to