pardom-zz / ActiveAndroid

Active record style SQLite persistence for Android
http://www.activeandroid.com
4.7k stars 1.03k forks source link

onUniqueConflict for individual columns is it possible? #441

Open nidhi-huskerit opened 8 years ago

nidhi-huskerit commented 8 years ago

when i m trying to update column based on if exist to database its returns me an error like "UNIQUE constraint failed" my model class is like, @Column(name = "QID", unique = true) private Integer ID; @Expose @Column(name = "WorkBookID", onUniqueConflicts = {Column.ConflictAction.REPLACE}) private Integer WorkBookID;

@Expose
@Column(name = "QuestionDesc", onUniqueConflicts = {Column.ConflictAction.REPLACE})
private String QuestionDesc;

@Expose
@Column(name = "UserAnswer",  onUniqueConflicts = {Column.ConflictAction.IGNORE})
private Integer UserAnswer;

@Expose
@Column(name = "UserAnswerType",onUniqueConflicts = {Column.ConflictAction.IGNORE})
private Integer UserAnswerType;

where i m wrong?