Relation constructor

const Relation({
  1. required Type target,
  2. required String name,
  3. String? key,
  4. List<String> fields = const [],
  5. List<String> keys = const [],
  6. String? inverse,
  7. ReferentialAction onDelete = ReferentialAction.restrict,
  8. bool constraint = true,
})

Declares a checked relation whose loading remains explicit.

Implementation

const Relation({
  required this.target,
  required this.name,
  this.key,
  this.fields = const [],
  this.keys = const [],
  this.inverse,
  this.onDelete = ReferentialAction.restrict,
  this.constraint = true,
});