示例#1
0
 public static function sync_model_relations($model)
 {
     $attrs = \Helper\Database\Attr::get_from_model($model);
     $relations = \Helper\Database\Relation::get_from_model($model);
     if (any($relations)) {
         foreach ($relations as $rel) {
             if ($rel->type == \System\Model\Database::REL_HAS_MANY && $rel->is_bilinear) {
                 self::sync_bilinear_relation_table($rel);
             }
         }
     }
 }