我試圖將一堆對象添加到db4o數據庫。看起來你必須爲每個對象創建一個新的對象,因爲如果我只是更新舊的值並再次存儲它,它就會覆蓋數據庫中的記錄,而我只能記錄一條記錄。因此,這裏就是我有工作: for (String o : d.students) {
Student stu1 = new Student(o);
db.store(stu1);
stu = null;
看起來,db4o會忽略配置參數,您嘗試在從另一個對象繼承的對象上索引字段。舉例來說,如果我有以下幾點: public class foo
{
private int theId;
public int TheId {get{return theId;}set{theId=value;}}
}
public class bar:foo
{
private st
我有這個問題,其中有一個類是ArrayList的屬性,然後將此類存儲在db4o容器中,在服務器重新啓動後清除列表。具有ArrayList的屬性 類看起來有點像這樣: public class Planet
{
public string Name { get; set; }
public string Identifier { get; set; }
// Pla
我使用db4o的使用對象: public Tra(String x, int y, int z, int pos, Date de, Date de2)
我收到一個新的對象(電車),我想比較只有三個參數(串x,INT Y, int z)。 因爲其他參數還沒有值。 我使用: Tra proto = new Tra(trat.getx(),trat.gety(),trat.getz(),0,nul
我想比較db4o和JSON中的對象。如果在JSON中不存在,我應該刪除db4o中的對象。 我有一個問題與if: if(tratdb4o.getMedication()==tratJson.getMedication()
我登錄了兩個字符串變量又都是相同的,但不進入如果改變igual的價值。 有人知道爲什麼嗎?的 for (int i=0;it2.hasNext();i++) {
ob
所以我遇到了Db4o API的一個奇怪問題。我試圖從數據庫中檢索某些類的對象(取決於用戶的查詢,但這不是真正相關的)。數據庫絕對是具有我想要檢索的類的對象。因此,例如,當我queryByExample()只是任何對象,然後打印出對象集合中的每個元素的類,像這樣...... public void evaluateQuery(ObjectContainer db) {
if (this.h