My hbm xml files are in the project librarie called Domain. In the hibernate.cfg.xml file I specify <mapping assembly="Domain" />
when I do a EmployeeDAO.get(typeof(Employee), 7)
I get Unknown Enityt class Domain.Employee
here is the debug output of Hibernate
------------------------------------------------
2005-11-17 15:02:36,927 [1980] DEBUG NHibernate.Cfg.Environment - no hibernate settings in app.config/web.config were found
2005-11-17 15:02:38,099 [1980] DEBUG NHibernate.Cfg.Configuration - connection.provider=NHibernate.Connection.DriverConnectionProvider
2005-11-17 15:02:38,099 [1980] DEBUG NHibernate.Cfg.Configuration - connection.driver_class=NHibernate.Driver.SqlClientDriver
2005-11-17 15:02:38,099 [1980] DEBUG NHibernate.Cfg.Configuration - connection.connection_string=Server=Northwind;initial catalog=Northwind;User ID=superuser;Password=qweqwe;
2005-11-17 15:02:38,099 [1980] DEBUG NHibernate.Cfg.Configuration - show_sql=true
2005-11-17 15:02:38,099 [1980] DEBUG NHibernate.Cfg.Configuration - dialect=NHibernate.Dialect.MsSql2000Dialect
2005-11-17 15:02:38,099 [1980] DEBUG NHibernate.Cfg.Configuration - use_outer_join=true
2005-11-17 15:02:38,099 [1980] DEBUG NHibernate.Cfg.Configuration - query.substitutions=true 1, false 0, yes 'Y', no 'N'
2005-11-17 15:02:38,099 [1980] DEBUG NHibernate.Cfg.Configuration - HBSpringSessionFactory<-Domain
2005-11-17 15:02:38,099 [1980] INFO NHibernate.Cfg.Configuration - searching for mapped documents in assembly: Domain
2005-11-17 15:02:38,099 [1980] INFO NHibernate.Cfg.Configuration - Configured SessionFactory: HBSpringSessionFactory
2005-11-17 15:02:38,099 [1980] DEBUG NHibernate.Cfg.Configuration - properties: System.Collections.Hashtable
2005-11-17 15:02:39,068 [1980] INFO NHibernate.Cfg.Configuration - processing one-to-many association mappings
2005-11-17 15:02:39,068 [1980] INFO NHibernate.Cfg.Configuration - processing one-to-one association property references
2005-11-17 15:02:39,068 [1980] INFO NHibernate.Cfg.Configuration - processing foreign key constraints
2005-11-17 15:02:39,068 [1980] INFO NHibernate.Dialect.Dialect - Using dialect: NHibernate.Dialect.MsSql2000Dialect
2005-11-17 15:02:39,068 [1980] INFO NHibernate.Cfg.SettingsFactory - use outer join fetching: True
2005-11-17 15:02:39,068 [1980] INFO NHibernate.Connection.ConnectionProviderFactory - Intitializing connection provider: NHibernate.Connection.DriverConnectionProvider
2005-11-17 15:02:39,068 [1980] INFO NHibernate.Connection.ConnectionProvider - Configuring ConnectionProvider
2005-11-17 15:02:39,068 [1980] INFO NHibernate.Cfg.SettingsFactory - Optimize cache for minimal puts: False
2005-11-17 15:02:39,068 [1980] INFO NHibernate.Cfg.SettingsFactory - echoing all SQL to stdout
2005-11-17 15:02:39,068 [1980] INFO NHibernate.Cfg.SettingsFactory - Query language substitutions: {yes='Y', true=1, no='N', false=0}
2005-11-17 15:02:39,068 [1980] INFO NHibernate.Cfg.SettingsFactory - cache provider: NHibernate.Cache.HashtableCacheProvider
2005-11-17 15:02:39,068 [1980] INFO NHibernate.Cfg.Configuration - instantiating and configuring caches
2005-11-17 15:02:39,068 [1980] INFO NHibernate.Impl.SessionFactoryImpl - building session factory
2005-11-17 15:02:39,068 [1980] DEBUG NHibernate.Impl.SessionFactoryImpl - instantiating session factory with properties: {show_sql=true, connection.provider=NHibernate.Connection.DriverConnectionProvider, dialect=NHibernate.Dialect.MsSql2000Dialect, connection.driver_class=NHibernate.Driver.SqlClientDriver, hibernate.session_factory_name=HBSpringSessionFactory, hibernate.use_outer_join=true, hibernate.connection.connection_string=Server=Northwind;initial catalog=Northwind;User ID=superuser;Password=qweqwe;, hibernate.connection.driver_class=NHibernate.Driver.SqlClientDriver, query.substitutions=true 1, false 0, yes 'Y', no 'N', connection.connection_string=Server=Northwind;initial catalog=Northwind;User ID=superuser;Password=qweqwe;, hibernate.connection.provider=NHibernate.Connection.DriverConnectionProvider, hibernate.dialect=NHibernate.Dialect.MsSql2000Dialect, use_outer_join=true, hibernate.show_sql=true, hibernate.query.substitutions=true 1, false 0, yes 'Y', no 'N'}
2005-11-17 15:02:39,068 [1980] DEBUG NHibernate.Impl.SessionFactoryObjectFactory - initializing class SessionFactoryObjectFactory
2005-11-17 15:02:39,068 [1980] DEBUG NHibernate.Impl.SessionFactoryObjectFactory - registered: f9fed28cfab64567ae5a28dacd4cb361(HBSpringSessionFactory)
2005-11-17 15:02:39,068 [1980] INFO NHibernate.Impl.SessionFactoryObjectFactory - Factory name:HBSpringSessionFactory
2005-11-17 15:02:39,068 [1980] DEBUG NHibernate.Impl.SessionFactoryImpl - Instantiated session factory
-----------------------------------------------
Anyone knows if my Nhibernate has actually read my mapping files. :?: :(
|