src/Mapper/Relation/HasMany.php
protected function checkOrder(Sql\Select $query)
    {
        $order  = $this->getEntityDescriptor()->getPrimaryKey()->getField();
        $order .= " DESC";
        if (null != $this->order) {
            $order = $this->order;
        }
        $query->order($order);
        return $this;
    }
protected function checkOrder(Sql\Select $query)
    {
        $order  = $this->getEntityDescriptor()->getPrimaryKey()->getField();
        $order .= " DESC";
        if (null != $this->order) {
            $order = $this->order;
        }
        $query->order($order);
        return $this;
    }
protected function checkOrder ( Sql \ Select $ query ) { $ order = $ this -> getEntityDescriptor ( ) -> getPrimaryKey ( ) -> getField ( ) ; $ order .= " DESC" ; if ( null != $ this -> order ) { $ order = $ this -> order ; } $ query -> order ( $ order ) ; return $ this ; }
Check custom order

@param Sql\Select $query
@return self
Check custom order