How are you working with your SQLite database? I'm assuming this is an in-memory database which has a common pitfall: when the session is closed and disposed, your database goes with it! Make sure you hold that connection open until you're finished with the database run.
If my assumption is wrong and you're using a file-based SQLite database, post your configuration code so we can try to find the problem. On Tue, Jul 28, 2009 at 2:10 PM, Tomk<[email protected]> wrote: > > > ok, now the generated sql is valid but SQLite does not recognise the > view. I get ----> System.Data.SQLite.SQLiteException : SQLite error > no such table: Theme > > Whereas when I execute the sql in SQLite expert directly all goes > well. Any suggestions on how to get this working with SQLite? > > On Jul 28, 9:01 pm, Stuart Childs <[email protected]> wrote: >> 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- Hide quoted text - >> >> - Show quoted text - > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
