The above error was causing me some grief, I did delete the object but for some reason a populate query was picking it up from the datastore.
I was able to check if the object was deleted with the following JDOHelper function: JDOHelper.isDeleted(item)
I used it as follows:
I was able to check if the object was deleted with the following JDOHelper function: JDOHelper.isDeleted(item)
I used it as follows:
import javax.jdo.JDOHelper;
import javax.jdo.ObjectState;
public List getWatchList() {
List watchList = new ArrayList();
List result = ccs.myasxpager.datasource.WatchList.getWatchList();
for (ccs.myasxpager.persistence.schema.WatchList item : result) {
if (JDOHelper.isDeleted(item))
continue;
String[] watchListItem = {item.getAsxCode(), ccs.myasxpager.datasource.Company.getCompanyNameByCode(item.getAsxCode()), ccs.myasxpager.datasource.Company.getIndustryByCode(item.getAsxCode())};
watchList.add(watchListItem);
}
return watchList;
}