Search code examples
androiddatabasesqliteunique

Cupboard for SQL-Lite to set unique field on one column


I am using Cupboard for android project. the project was very simple but later I need to set some fields as unique column in my class.

eg:

class book {
Long _id;
String name; // this name should be unique 
String auther;
}

I am not able to figure out how to do that.


Solution

  • Issue has been resolved recently by Cupboard: https://bitbucket.org/littlerobots/cupboard/issues/8/flexible-way-to-control-how-entities-are