Hi,
I'm trying to create a test repository helper class that utilizes SQLite
inMemory and  Fluent NHibernate, but i cant get the thing to work. I already
read a bunch of tutorials and sample codes, but the darn thing simply
doesn't work!

I've created this sample code snippet to illustrate the problem.


ISessionFactory factory = Fluently.Configure()

.Database(SQLiteConfiguration.Standard.InMemory)
                                                   .Mappings(m =>
m.FluentMappings

.AddFromAssemblyOf<User>())
                                                   .BuildSessionFactory();

                ISession session = factory.OpenSession();
                IList<User> list =
session.CreateCriteria(typeof(User)).List<User>();

This is the user class

public class User : Entity<int>
    {
        public virtual string Nome { get; set; }

        public User()
        {
        }
    }

and here is the mapping (the Id comes from the base entity class)

public class UserMap : ClassMap<User>
    {
        public UserMap()
        {
            Id(x => x.Id);
            Map(x => x.Nome);
        }
    }

All very simple and stupid, but when i run the code above i get this
exception:

{"SQLite error\r\nno such table: User"}

The SessionFactory and Session configurations looks fine. What Im doing
wrong? Using FluentNhibernate version 0.1.0.453 and System.Data.SQLite
1.0.60.0 on windows xp 32.

Thanks for your help!


-- 
Marcos Castilho da Costa Matos

--~--~---------~--~----~------------~-------~--~----~
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