Closed marconi closed 12 years ago
Ids are not indexed at the moment. The best way to retrieve a single Item is to use get_by_id
I ended-up creating an IntegerField and override save() then assign value of self.id to this custom integer field. Then I can use the custom field field like: Message.filter(mid__gt=0)
How do I filter by ids?
I tried filtering by
Message.filter(id__gt=0)
and its giving me<broken repr (AttributeNotIndexed: Attribute id__gt is not indexed in Message class.>
.