에서 ORMLite와 지속 ArrayList를
Goods
을 유지하기 위해 노력하고, 여기 componentList
을 유지하는 방법을 모르겠어요. 비슷한 질문을 Persisting a Collection class with ORMLite in android 발견했지만 문제를 해결하는 방법을 가리키고 있지 않습니다.
public class Goods extends Object implements Serializable
{
private static final long serialVersionUID = -7560219283718464481L;
...
public ArrayList<String> componentList;
public String getComponentList(){
return componentList;
}
public void setComponentList(ArrayList<String> componentList){
this.componentList = componentList;
}
...
}
더 쉬운 해결책은 http://stackoverflow.com/questions/18441595/how-to-store-the-ar-ylist-in-ormlite-database/31598771#31598771을 참조하십시오. –