Hi,

I am encountering the problem that if i change the
 new SchemaExport(config).Create(false, true); //if i leave it like
this i always have a empty database after a restart of my applikation
to
 new SchemaExport(config).Create(false, false); //the content of the
database is kept


my config:

return Fluently.Configure()
                .Database(SQLiteConfiguration.Standard
                              .UsingFile(DbFile)) //using filename
                .Mappings(m =>
 
m.FluentMappings.AddFromAssemblyOf<StartForm>()) //get mappings from
assembly
                .ExposeConfiguration(BuildSchema)
                .BuildSessionFactory();


i recieve the following error message:

Creating a proxy instance failed
   bei NHibernate.ByteCode.Castle.ProxyFactory.GetProxy(Object id,
ISessionImplementor session)
   bei
NHibernate.Tuple.Entity.AbstractEntityTuplizer.CreateProxy(Object id,
ISessionImplementor session)
   bei
NHibernate.Persister.Entity.AbstractEntityPersister.CreateProxy(Object
id, ISessionImplementor session)
   bei
NHibernate.Event.Default.DefaultLoadEventListener.CreateProxyIfNecessary(LoadEvent
event, IEntityPersister persister, EntityKey keyToLoad, LoadType
options, IPersistenceContext persistenceContext)
   bei
NHibernate.Event.Default.DefaultLoadEventListener.ProxyOrLoad(LoadEvent
event, IEntityPersister persister, EntityKey keyToLoad, LoadType
options)
   bei
NHibernate.Event.Default.DefaultLoadEventListener.OnLoad(LoadEvent
event, LoadType loadType)
   bei NHibernate.Impl.SessionImpl.FireLoad(LoadEvent event, LoadType
loadType)
   bei NHibernate.Impl.SessionImpl.InternalLoad(String entityName,
Object id, Boolean eager, Boolean isNullable)
   bei NHibernate.Type.EntityType.ResolveIdentifier(Object id,
ISessionImplementor session)
   bei NHibernate.Type.EntityType.ResolveIdentifier(Object value,
ISessionImplementor session, Object owner)
   bei NHibernate.Engine.TwoPhaseLoad.InitializeEntity(Object entity,
Boolean readOnly, ISessionImplementor session, PreLoadEvent
preLoadEvent, PostLoadEvent postLoadEvent)
   bei NHibernate.Loader.Loader.InitializeEntitiesAndCollections(IList
hydratedObjects, Object resultSetId, ISessionImplementor session,
Boolean readOnly)
   bei NHibernate.Loader.Loader.DoQuery(ISessionImplementor session,
QueryParameters queryParameters, Boolean returnProxies)
   bei
NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor
session, QueryParameters queryParameters, Boolean returnProxies)
   bei NHibernate.Loader.Loader.DoList(ISessionImplementor session,
QueryParameters queryParameters)
   bei
NHibernate.Loader.Loader.ListIgnoreQueryCache(ISessionImplementor
session, QueryParameters queryParameters)
   bei NHibernate.Loader.Loader.List(ISessionImplementor session,
QueryParameters queryParameters, ISet`1 querySpaces, IType[]
resultTypes)
   bei
NHibernate.Loader.Criteria.CriteriaLoader.List(ISessionImplementor
session)
   bei NHibernate.Impl.SessionImpl.List(CriteriaImpl criteria, IList
results)
   bei NHibernate.Impl.CriteriaImpl.List(IList results)
   bei NHibernate.Impl.CriteriaImpl.List()
   bei NHibernate.Impl.CriteriaImpl.UniqueResult()
   bei Bookingsystem.Classes.entities.Admin.Default() in C:\Dokumente
und Einstellungen\tomek\Eigene Dateien\Visual Studio 2010\Projects
\hostelbooking\trunk\Hostel-Booking\Classes\entities\Admin.cs:Zeile
83.
   bei Bookingsystem.Forms.StartForm.CreateDefaultAdmin() in C:
\Dokumente und Einstellungen\tomek\Eigene Dateien\Visual Studio
2010\Projects\hostelbooking\trunk\Hostel-Booking\Forms
\StartForm.cs:Zeile 170.
   bei Bookingsystem.Forms.StartForm.InitlializeStartup() in C:
\Dokumente und Einstellungen\tomek\Eigene Dateien\Visual Studio
2010\Projects\hostelbooking\trunk\Hostel-Booking\Forms
\StartForm.cs:Zeile 144.
   bei Bookingsystem.Forms.StartForm.Form1_Load(Object sender,
EventArgs e) in C:\Dokumente und Einstellungen\tomek\Eigene Dateien
\Visual Studio 2010\Projects\hostelbooking\trunk\Hostel-Booking\Forms
\StartForm.cs:Zeile 243.
   bei System.Windows.Forms.Form.OnLoad(EventArgs e)
   bei System.Windows.Forms.Form.OnCreateControl()
   bei System.Windows.Forms.Control.CreateControl(Boolean
fIgnoreVisible)
   bei System.Windows.Forms.Control.CreateControl()
   bei System.Windows.Forms.Control.WmShowWindow(Message& m)
   bei System.Windows.Forms.Control.WndProc(Message& m)
   bei System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   bei System.Windows.Forms.Form.WmShowWindow(Message& m)
   bei System.Windows.Forms.Form.WndProc(Message& m)
   bei
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   bei
System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr
hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   bei System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef
hWnd, Int32 nCmdShow)
   bei System.Windows.Forms.Control.SetVisibleCore(Boolean value)
   bei System.Windows.Forms.Form.SetVisibleCore(Boolean value)
   bei System.Windows.Forms.Control.set_Visible(Boolean value)
   bei
System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32
reason, ApplicationContext context)
   bei
System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32
reason, ApplicationContext context)
   bei System.Windows.Forms.Application.Run(Form mainForm)
   bei Bookingsystem.Program.Main(String[] args) in C:\Dokumente und
Einstellungen\tomek\Eigene Dateien\Visual Studio 2010\Projects
\hostelbooking\trunk\Hostel-Booking\Program.cs:Zeile 23.
   bei System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly,
String[] args)
   bei System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
assemblySecurity, String[] args)
   bei
Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   bei System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   bei System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state, Boolean
ignoreSyncCtx)
   bei System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
   bei System.Threading.ThreadHelper.ThreadStart()




-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" 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/nhusers?hl=en.

Reply via email to