get_by functions should raise exception when object cannot be found.