Update: The reason for NewsMap instead of Club was me trying if I got a
different result with going straight to the mapping project but I was out of
luck :D I did however find the reason for why fluent did not work but auto
did. I had accidently set WithLengthOf(150) on a datetime property. It's
very strange I got no error message about that though. No exceptions what so
ever.

Now I am facing some other issues but it should be solve:able!

Thanks Hudson


2009/7/11 Hudson Akridge <[email protected]>

> 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