Always cast id in fetch_by_id to an integer.