开发者

Result of dao.createOrUpdate() in ORMLite

I wonder if it is possible to find out if ORMLite's dao.createOrUpdate() method has actually created or updated a table row. There is a result Object (CreateOrUpdateStatus), which contains these informations, but all indicating fields (created, updated and numLinesChanged) are package-visible only. Is that a bug or does any开发者_运维问答one have an idea why is that so?

Thanks.


Oh what an epic fail. This is definitely a bug which was fixed in version 4.25 on 8/22/2011. Sorry about this @steffen.

The permissions on that class have been corrected:

public class CreateOrUpdateStatus {
    ...
    public boolean isCreated() {
        return created;
    }
    public boolean isUpdated() {
        return updated;
    }
    public int getNumLinesChanged() {
        return numLinesChanged;
    }
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜