public function addEagerLoad($relationAlias, $constraints = null)
{
if (!is_string($relationAlias)) {
throw new \InvalidArgumentException(sprintf('$relationAlias expects to be a string, `%s` given', gettype($relationAlias)));
}
if ($constraints !== null && !is_callable($constraints)) {
throw new \InvalidArgumentException(sprintf('$constraints expects to be a callable, `%s` given', gettype($constraints)));
}
$this->eagerLoads[$relationAlias] = $constraints;
return $this;
}