/**
  * Filter the query by a related \App\Models\SchoolYear object
  *
  * @param \App\Models\SchoolYear|ObjectCollection $schoolYear The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @throws \Propel\Runtime\Exception\PropelException
  *
  * @return ChildEngagementQuery The current query, for fluid interface
  */
 public function filterBySchoolYear($schoolYear, $comparison = null)
 {
     if ($schoolYear instanceof \App\Models\SchoolYear) {
         return $this->addUsingAlias(EngagementTableMap::COL_SCHOOL_YEAR_ID, $schoolYear->getId(), $comparison);
     } elseif ($schoolYear instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(EngagementTableMap::COL_SCHOOL_YEAR_ID, $schoolYear->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterBySchoolYear() only accepts arguments of type \\App\\Models\\SchoolYear or Collection');
     }
 }