Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Result of dao.createOrUpdate() in ORMLite

Tags:

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 anyone have an idea why is that so?

Thanks.

like image 315
steffen Avatar asked Dec 12 '25 15:12

steffen


1 Answers

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;
    }
}
like image 89
Gray Avatar answered Dec 17 '25 00:12

Gray



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!