Can't get firstExample to work
Hi,
I'm evaluating FNH for a project and started with trying to run the first example in the wiki. I'm using v1.1 from the downloads page.
The example compiles without any issues but always throws an exception at:
session.SaveOrUpdate(barginBasin);
NHibernate.MappingException was unhandled
Message="No persister for: NFluentTest.Entities.Store" Source="NHibernate" StackTrace:
at NHibernate.Impl.SessionFactoryImpl.GetEntityPersister(String entityName)
at NHibernate.Impl.SessionImpl.GetEntityPersister(String entityName, Object obj)
at NHibernate.Engine.ForeignKeys.IsTransient(String entityName, Object entity, Nullable`1 assumed, ISessionImplementor session)
at NHibernate.Event.Default.AbstractSaveEventListener.GetEntityState(Object entity, String entityName, EntityEntry entry, ISessionImplementor source)
at NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.PerformSaveOrUpdate(SaveOrUpdateEvent event)
at NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.OnSaveOrUpdate(SaveOrUpdateEvent event)
at NHibernate.Impl.SessionImpl.FireSaveOrUpdate(SaveOrUpdateEvent event)
at NHibernate.Impl.SessionImpl.SaveOrUpdate(Object obj)
at NFluentTest.Program.Main() in H:\Development\NFluentTest\NFluentTest\Program.cs:line 58
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
Has anyone got a clue as to what could be wrong? It looks as though I won't want to use automapping as the database schema I'll be using is pretty awful with it's table/column names and I'll want something nicer in the code.
Support Staff 2 Posted by James Gregory on 16 Aug, 2010 08:47 PM
Have a look at the example projects that ship with the source distribution;
I'm guessing there's something out of date in the wiki.
On Fri, Aug 13, 2010 at 5:20 PM, matt <
***@tenderapp.com<tender%***@tenderapp.com>
> wrote: