Updated id_as_key to field_as_key in Db selects