private function relatedRows($bean, $type, $sql = '', $bindings = array())
{
$ids = array($bean->id);
$sourceType = $bean->getMeta('type');
try {
return $this->writer->queryRecordRelated($sourceType, $type, $ids, $sql, $bindings);
} catch (SQLException $exception) {
$this->handleException($exception);
return array();
}
}