Factory: correctly pass record id if single record is returned