whereRelatedByValue function

dynamic whereRelatedByValue (dynamic foreignKeyValue)

Matcher for matching ManagedRelationship property when using Query.where.

This matcher can be assigned to a ManagedRelationship property. The underlying PersistentStore will determine the name of the foreign key column to build the query. See Query.where.

Example:

  var q = new Query<SomethingUserHas>()
    ..where.user = whereRelatedByValue(userPrimaryKey);

Implementation

dynamic whereRelatedByValue(dynamic foreignKeyValue) {
  return new ComparisonMatcherExpression(
      foreignKeyValue, MatcherOperator.equalTo);
}