Example #1
0
 public static function init($m)
 {
     parent::init($m);
     $m->id = 'primary';
     $m->child = ['has-one', 'class' => get_called_class(), 'fk' => 'parent_id'];
     $m->nullChild = ['has-one?', 'class' => get_called_class(), 'fk' => 'parent_id', 'pk' => 'id'];
 }
Example #2
0
 public static function init($m)
 {
     parent::init($m);
     $m->id = 'primary';
     $m->parent = ['belongs-to', 'class' => get_called_class(), 'fk' => 'parent_id'];
     $m->nullParent = ['belongs-to?', 'class' => get_called_class(), 'fk' => 'parent_id', 'pk' => 'id'];
 }
Example #3
0
 public static function init($m)
 {
     parent::init($m);
     $m->id = 'primary';
     $m->name = 'string';
 }
Example #4
0
 public static function init($m)
 {
     parent::init($m);
     $m->id = 'primary';
 }