0

几周以来,我编写了未执行的操作或未在数据库中找到对象的读取操作。

它之前完美运行。谷歌是否存在已知问题?

这是我的代码:

String query = "name==" + "\"" + name + "\"";
PersistenceManager pm = PMF.get().getPersistenceManager();
List<UserAddresses> result = null;
try {
    Query q = (Query) pm.newQuery(UserAddresses.class);
    q.setFilter(query);
    result = (List<UserAddresses>) q.execute();                          
    q.closeAll();                          
    if (result != null)
        return result.get(0).getAddressesArray();
    logger.severe("UserAddresses not found");
    return null;
}catch (Exception e) {throw e;} 
finally {pm.close();   }  
4

0 回答 0