I want save all objects ReportDB as new row in DB
App.get(context)
.getStorIO()
.put()
.object(new ReportDB(keyStore.getKeyCategoryId(), keyStore.getKeyShelfId()))
.prepare()
.asRxObservable().subscribe(putResult -> ZLog.d("insertedId = "+putResult.insertedId()),
throwable -> ZLog.d("throwable = ",throwable));
ReportDB is
@StorIOSQLiteColumn(name = ReportTable.COLUMN_ID,key = true)
long id;
@StorIOSQLiteColumn(name = ReportTable.CATEGORY_ID_I)
long categoryId;
@StorIOSQLiteColumn(name = ReportTable.SHELF_ID_I)
long shelfId;
@StorIOSQLiteColumn(name = ReportTable.LATITUDE_R)
double latitude;
@StorIOSQLiteColumn(name = ReportTable.LONGITUDE_R)
double longitude;
public ReportDB(long categoryId, long shelfId) {
this.categoryId = categoryId;
this.shelfId = shelfId;
}
But now, after run code twice, I have only one row and logs
insertedId = 0
insertedId = null
How auto increment id ?