I'm using greenDAO for an ORM in an Android App that I'm writing.
I generated all the DAO files and am now at the point of inserting, updating and deleting in my database.
I'm at a particular point where I'm not sure if an Entity will exist in the database or not and I'd like to update the Entity if it exists or insert the Entity if it does not.
(Also, I have a unique constraint on 2 columns, for simplicity call them ColumnA and ColumnB).
Anyone know how to perform this type of task? Every time I try to insert into the database I get a COLUMNS ARE NOT UNIQUE SqLite error which tells me that I'm not updating rather inserting a record whose uniqueness already exists in the database.
Thank you! Best Regards, Christopher Steven