Esempio n. 1
0
 public static function initialize(Jelly_Meta $meta)
 {
     $meta->fields(array('left' => new Jelly_Field_MPTT_Left(array('column' => 'lft')), 'right' => new Jelly_Field_MPTT_Right(array('column' => 'rgt')), 'level' => new Jelly_Field_MPTT_Level(array('column' => 'lvl')), 'scope' => new Jelly_Field_MPTT_Scope(array('column' => 'scope'))));
     // Check we don't have a composite primary Key
     if (is_array($meta->primary_key())) {
         throw new Kohana_Exception('Jelly_MPTT does not support composite primary keys');
     }
 }