Hi,
I want to create a behavior with a self-referencing relation. Its goal
is to make copies of records. Here is what I've tried:
class MyTemplate extends Doctrine_Template
{
public function setTableDefinition()
{
$this->hasColumn('original_id', 'integer', 4);
}
public function setUp()
{
$this->hasOne('MyTemplate as Original', array(
'local' => 'original_id',
'foreign' => 'id',
));
$this->hasMany('MyTemplate as Copies', array(
'local' => 'id',
'foreign' => 'original_id',
));
}
}
I get this exception: Couldn't find concrete implementation for
template MyTemplate
Is there a way to define self-referencing relations in behaviors?
(I use Doctrine 1.2.0-BETA1 in symfony 1.3.0-BETA1)