I am writing a plugin with a Record. I want the primary key of the table to also be a foreign key relating to the craft_relations table. Ordinarily, I would add something like this...
public function defineRelations()
{
return array(
'element' => array(static::BELONGS_TO, 'ElementRecord', 'id', 'required' => true, 'onDelete' => static::CASCADE),
);
}
However, it seems like the craft_relations table does not have a matching Record.
How can I add a primary key column which is also a foreign key?