开发者

Result of dao.createOrUpdate() in ORMLite

开发者 https://www.devze.com 2023-03-23 22:48 出处:网络
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 info

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

精彩评论

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

关注公众号