示例#1
0
文件: HasMany.php 项目: Zarganwar/orm
 protected function applyDefaultOrder(ICollection $collection)
 {
     if (isset($this->metadata->args->relationship['order'])) {
         return $collection->orderBy($this->metadata->args->relationship['order'][0], $this->metadata->args->relationship['order'][1]);
     } else {
         return $collection;
     }
 }