protected function _guessToJoinColumn()
{
if (null === $this->_to_join_column) {
$guess = $this->_to_table->getSingularName() . '_id';
if ($this->_join_table->hasColumn($guess)) {
$this->setToJoinColumn($guess);
} else {
throw new \Exception("Unable to guess from_join_column and none specified");
}
}
}