Solved problem with the get_by. Using $this->db while it should be $this->get for the function inside the current class.