addConstraints method

  1. @override
void addConstraints()
override

Set the base constraints on the relation query.

Implementation

@override
void addConstraints() {
  _performJoin();
  _addPivotSelects();
  if ((parent as KhademModel).getAttribute(parentKey) != null) {
    query.where(
      '$table.$foreignPivotKey',
      '=',
      (parent as KhademModel).getAttribute(parentKey),
    );
  }
}