def get_object_ids(model, meteor_ids):
if model is ObjectMapping:<EOL><INDENT>raise TypeError("<STR_LIT>")<EOL><DEDENT>meta = model._meta<EOL>alea_unique_fields = [<EOL>field<EOL>for field in meta.local_fields<EOL>if isinstance(field, AleaIdField) and field.unique and not field.null<EOL>]<EOL>result = collections.OrderedDict(<EOL>(str(meteor_id), None)<EOL>for meteor_id<EOL>in meteor_ids<EOL>)<EOL>if len(alea_unique_fields) == <NUM_LIT:1>:<EOL><INDENT>aid = alea_unique_fields[<NUM_LIT:0>].name<EOL>query = model.objects.filter(**{<EOL>'<STR_LIT>' % aid: meteor_ids,<EOL>}).values_list(aid, '<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>content_type = ContentType.objects.get_for_model(model)<EOL>query = ObjectMapping.objects.filter(<EOL>content_type=content_type,<EOL>meteor_id__in=meteor_ids,<EOL>).values_list('<STR_LIT>', '<STR_LIT>')<EOL><DEDENT>for meteor_id, object_id in query:<EOL><INDENT>result[meteor_id] = object_id<EOL><DEDENT>return result<EOL>
Return all object IDs for the given meteor_ids.