0
Sugarモデルで自動インクリメントプライマリキーをどのように定義できますか? ドゥ砂糖は自動的にあなたは私が「@Table」であなたのクラスに注釈を付けるカスタムテーブルを作成することも砂糖ormの自動インクリメントプライマリキー
import com.orm.SugarRecord;
public class Customers extends SugarRecord {
int id; // this field must be auto increment primary key
String name;
String tel;
String mobile;
String address;
String create_date;
public Customers(){}
public Customers(int id, String name, String tel, String mobile, String address, String create_date){
this.id = id;
this.name = name;
this.tel = tel;
this.mobile = mobile;
this.address = address;
this.create_date = create_date;
}
}
回答します。https:// githubの.com/satyan/sugar/issues/593 – msoa