Here is the full stack

[MappingException: An association from the table dnnSphere_Package
refers to an unmapped class: dnnSphere.Meta.Model.MetaProject]
   NHibernate.Cfg.Configuration.LogAndThrow(Exception exception) +107
   NHibernate.Cfg.Configuration.SecondPassCompileForeignKeys(Table
table, ISet done) +642
   NHibernate.Cfg.Configuration.SecondPassCompile() +797
   NHibernate.Cfg.Configuration.BuildSessionFactory() +174
   FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory() +162

[FluentConfigurationException: An invalid or incomplete configuration
was used while creating a SessionFactory. Check PotentialReasons
collection, and InnerException for more detail.

  * Database was not configured through Database method.
  * No mappings were configured through the Mappings method.
]
   FluentNHibernate.Cfg.FluentConfiguration.BuildSessionFactory() +191
   dnnSphere.NHibernate.NHibernateHelper.InitSessionFactory() +94

[Exception: NHibernate initialization failed]
   dnnSphere.NHibernate.NHibernateHelper.InitSessionFactory() +178
   dnnSphere.NHibernate.NHibernateHelper..ctor() +54
   dnnSphere.NHibernate.NHibernateHelper..cctor() +39

[TypeInitializationException: The type initializer for
'dnnSphere.NHibernate.NHibernateHelper' threw an exception.]
   dnnSphere.NHibernate.NHibernateHelper.get_Instance() +0
 
dnnSphere.NHibernate.HttpModules.SessionPerRequestModule.Application_BeginRequest
(Object sender, EventArgs e) +37
 
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute
() +68
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step,
Boolean& completedSynchronously) +75

On Mar 1, 11:31 am, James Gregory <[email protected]> wrote:
> That should work. Have you tested your config without Fluent?
>
> On 3/1/09, epitka <[email protected]> wrote:
>
>
>
> > Ok I can do it like this
>
> >   Configuration cfg = LoadDefaultConfiguration();
> >                 _sessionFactory = Fluently.Configure
> > (cfg).BuildSessionFactory();
>
> > but how do I add mapping assembly. Any ideas? nhibernate.config has
> > mapping tag but is does not seem to work.
>
> > On Mar 1, 8:38 am, epitka <[email protected]> wrote:
> >> hi,
> >> Is there a way to load nhibernate.config directly through fluent? I
> >> have a common assembly that I use for all NH project that deals with
> >> sessions, config etc. Now I would like to be able to map entities
> >> using Fluent but configure using normal nhibernate.config. Why? Well
> >> for one in this line for example I don't know the assembly name, it is
> >> specified in nhibernate.config.
> >> .Mappings(m =>
> >>       m.FluentMappings.AddFromAssemblyOf<Program>())
--~--~---------~--~----~------------~-------~--~----~
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