This project is read-only.
1

Closed

Save database issue

description

Hi Sergey,
 
the following code gives me problem:
 
// *******************************
// Delete database
Database.DeleteDatabase( "test" );
 
// Create database
Database newDb = Database.CreateDatabase("test");
newDb.CreateTable<Person>();
newDb.Save();
 
// Now, re-open it - just like we would if the application restarted
Database db = Database.OpenDatabase("test");
 
if (db.Table<Person>() != null){
db.Table<Person>().Add(NewRandomPerson());
db.Save();
}
// *******************************
 
This will throw the 'TableWithoutDatabaseCannotBeSaved' exception on the item.Save() command. Basically this is what happens when my users re-start the application and the database is reloaded.
 
Any ideas? I am using your lazy loading release.
 
Thanks / Simon
Closed Aug 7, 2009 at 2:10 AM by SergeyBarskiy
Bug fix release posted today addresses this problem.

comments

SergeyBarskiy wrote Aug 6, 2009 at 1:40 PM

Thanks for reportin this Simon. I will take a look as soon as I get home from work. I thought I had a unit test for this in my test project, but maybe not.

SergeyBarskiy wrote Aug 7, 2009 at 2:05 AM

Thanks for reporting this issue. It is fixed in the latest release - BugFixRelease.

wrote Aug 7, 2009 at 2:10 AM

simonv wrote Aug 7, 2009 at 8:17 AM

No problem Sergey. Thanks for the quick update!

wrote Feb 13, 2013 at 10:57 PM

wrote May 16, 2013 at 4:45 AM