android - How to store the arraylist in ormlite database -


i trying save arraylist of class objects ormlite database , giving error , java.lang.illegalargumentexception: no fields have databasefield annotation in class java.util.arraylist

my code is

@databasetable public class managemodeldetails {  @databasefield(generatedid = true) private int id;  @databasefield(foreign = true, foreignautorefresh = true) private arraylist<modeldetails> listmodeldetails;  // =============================================== public managemodeldetails() {     super(); }  // ===============================================  public managemodeldetails(int id, arraylist<modeldetails> listmodeldetails) {     super();     this.id = id;     this.listmodeldetails = listmodeldetails; }  // ===============================================  public void setid(int id) {     this.id = id; }  public int getid() {     return id; }  public void setmodellist(arraylist<modeldetails> listmodeldetails) {     this.listmodeldetails = listmodeldetails; }  public arraylist<modeldetails> getmodellist() {     return listmodeldetails; }  } 

i think need use foreign collections. take here:


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -