Hi, I'm generating my models from database and I get something like this:
public function setUp()
{
parent::setUp();
$this->hasOne('Articles', array(
'local' => 'article_id',
'foreign' => 'id'));
$this->hasOne('Users', array(
'local' => 'voter_id',
'foreign' => 'id'));
$this->hasOne('Users as Users_4', array(
'local' => 'author_id',
'foreign' => 'id'));
}
Is there any way to tell doctrine, what should be the names of relationships. For example to get something like this:
public function setUp()
{
$this->hasOne('Articles', array(
'local' => 'article_id',
'foreign' => 'id'));
$this->hasOne('Users as Voter', array(
'local' => 'voter_id',
'foreign' => 'id'));
$this->hasOne('Users as Author', array(
'local' => 'author_id',
'foreign' => 'id'));
}
I know it is possible when you generate models from YAML files or write them from scratch, but is it possible when you generate models from DB?