fuel/orm — Issue #133: [Feature] Label an Relation
Author: dbpolito
Created: 2012-01-26 21:13:22+00:00
State: open

Would be great if there is a way to label the rellation, something like:

protected static $_has_many = array('comments' => array(
'table' => 'table_name',
'model_to' => 'Model_Fancy_Comment',
'key_from' => 'article_id',
'key_to' => 'parent_article_id',
'cascade_save' => true,
'cascade_delete' => false,
// there are some more options for specific relation types
));

It's also good when we need to do 2 relations to same table but different key_from, for example: a table that has user_id_from and user_id_to or something like that.