public function withHasMany(array $data, $relatedModel, $relation_name){
        $this->withHasMany['relation'] = $relation_name;
        foreach($data as $k=>$v){
            $this->withHasMany['data'][] = new $relatedModel($v);
        }
        return $this;
    }