I am trying to save the arraylist of class objects into the ormlite database , but it is giving the error , java.lang.IllegalArgumentException: No fields have a DatabaseFiel
If you want to save an ArrayList of objects to ORMLite the easiest way is this:
@DatabaseField(dataType = DataType.SERIALIZABLE)
private SerializedList myObjects;
and to get my list of objects:
public List getMyObjects() {
return myObjects;
}
and here is SerializedList:
public class SerializedList extends ArrayList implements Serializable {
}