The different assemblies for entities and mappings shouldn't matter as long
as all the references are set. What error message do you get when you
attempt the fluent mappings? And why is your automapping referencing Club
but Fluent references NewsMap?

On Fri, Jul 10, 2009 at 11:31 PM, Mikael Henriksson <[email protected]>wrote:

> Hi,
>
> It's me again :) I had a strange thing happening just now. I can not add
> fluent mappings but automappings work.
>
> FLUENT MAPPING
>             _sessionFactory = Fluently.Configure()
>
> .Database(SQLiteConfiguration.Standard.UsingFile(PathToSqlLiteDb))
>                     .Mappings(m =>
> m.FluentMappings.AddFromAssemblyOf<NewsMap>())
>                     .ExposeConfiguration(BuildSchema)
>                     .BuildConfiguration().BuildSessionFactory();
>
>             _session = _sessionFactory.OpenSession();
>
> AUTO MAPPING
>             _sessionFactory = Fluently.Configure()
>
> .Database(SQLiteConfiguration.Standard.UsingFile(PathToSqlLiteDb))
>                 .Mappings(m =>
> m.AutoMappings.Add(AutoPersistenceModel.MapEntitiesFromAssemblyOf<Club>()))
>                 .ExposeConfiguration(BuildSchema)
>                 .BuildConfiguration().BuildSessionFactory();
>
>             _session = _sessionFactory.OpenSession();
>
> BuildSchema
>         private void BuildSchema(Configuration config)
>         {
>             if (File.Exists(PathToSqlLiteDb))
>             {
>                 File.Delete(PathToSqlLiteDb);
>             }
>
>             new SchemaExport(config).Create(true, true);
>
>         }
>
> The mappings are located in a different assembly than the entities. Is
> there something I need to explicitly do to make it work then?
>
>
> >
>


-- 
- Hudson
http://www.bestguesstheory.com
http://twitter.com/HudsonAkridge

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