1
我正在使用db4o作爲一個簡單的應用程序,並帶有嵌入式數據庫。當我保存一個對象,然後更改該對象時,是否假設db4o返回已更改的對象?Db4o對象更新
下面的代碼:
[Test]
public void NonReferenceTest()
{
Aim localAim = new Aim("local description", null);
dao.Save(localAim);
// changing the local value should not alter what we put into the dao
localAim.Description = "changed the description";
IQueryable<Aim> aims = dao.FindAll();
var localAim2 = new Aim("local description", null);
Assert.AreEqual(localAim2, aims.First());
}
測試失敗。我需要以任何特殊方式安裝db4o容器嗎?將它包裝在提交調用中?由於