setPrimaryValue abstract method

dynamic setPrimaryValue(
  1. dynamic value
)

Update the primary value automatically when save method is executed.

For example,

// user.dart
setPrimaryValue(value){
  id = value;
}

var user = User(name:'John');
// The above record does not exist in table. So let's create record using save() method
user.save();

// So user.id will be the primary value of inserted record in table.

Implementation

setPrimaryValue(value);