I am using MongoDB and I am attempting to save and it just does not return??
this is my controller:
public ActionResult doSomething(FormCollection collection)
{
if (collection == null || collection.Count == 0)
return View(Tenant);
var acct = new Account();
var whitelist = new String[]{"Name"};
TryUpdateModel(acct, whitelist, collection.ToValueProvider());
Tenant.Name = acct.Name;
Tenant.Save();
return View(Tenant);
}
and this is the Save method:
public override void Save(){
var acct = Application.Session.GetCollection<Account>();
acct.Save(this);
}
when it hits the line acct.Save(), it never returns. Any clue why this might happen?
The problem was that I was trying to use DateTime to store data as a MongoObject but
MongoDB only has the following data types:
Integer (32-bit signed value)
Long (64-bit signed value)
Double (64-bit IEEE754 fp value)
String
http://code.google.com/p/morphia/wiki/PropertyAnnotation