コード例 #1
0
ファイル: HasOneTest.php プロジェクト: drwrf/mismatch-orm
 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'];
 }
コード例 #2
0
ファイル: BelongsToTest.php プロジェクト: drwrf/mismatch-orm
 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'];
 }
コード例 #3
0
ファイル: PersistTest.php プロジェクト: drwrf/mismatch-orm
 public static function init($m)
 {
     parent::init($m);
     $m->id = 'primary';
     $m->name = 'string';
 }
コード例 #4
0
ファイル: DestroyTest.php プロジェクト: drwrf/mismatch-orm
 public static function init($m)
 {
     parent::init($m);
     $m->id = 'primary';
 }