Commits

Arie W. Subagja committed 44b2faa

auto configure buat relationship

  • Participants
  • Parent commits ff20da9

Comments (0)

Files changed (2)

File classes/malam/model/category/event.php

 abstract class Malam_Model_Category_Event extends Model_Hierarchy
 {
     /**
-     * "Has many" relationships
-     * @var array
-     */
-    protected $_has_many        = array(
-        'events'          => array('model' => 'event', 'foreign_key' => 'hierarchy_id')
-    );
-
-    /**
      * Hierachy Model Name
      *
      * @var string

File classes/malam/model/event.php

     protected $_route_name      = 'event';
 
     /**
-     * "Belongs to" relationships
-     * @var array
-     */
-    protected $_belongs_to      = array(
-        'user'          => array('model' => 'user', 'foreign_key' => 'user_id'),
-        'category'      => array('model' => 'category_event', 'foreign_key' => 'hierarchy_id'),
-    );
-
-    /**
      * "Has one" relationships
      * @var array
      */
 
         return $result;
     }
-}
+}