/**
* @param object $entity Entity to retrieve relationships from
* @param string $relationship_name Name of the relationship on provided entity
* @param string $sort_by Sort by column
* @param Direction $direction Assumes ascending if omitted
* @param int $start Start index (inclusive), null/0 for beginning of set
* @param int $end Stop index (inclusive), null/-1 for end of set, -2 for penultimate record
*/
public function __construct($entity, $relationship_name, $sort_by, Direction $direction = null, $start = null, $end = null)
{
parent::__construct($entity);
$this->entity = $entity;
$this->relationship_name = $relationship_name;
$this->sort_by = $sort_by;
$this->direction = $direction ?: Direction::ASC();
$this->start = $start;
$this->end = $end;
}