I have a model with an ArrayField:
class Item(models.Model):
path = ArrayField(models.IntegerField(), blank=True, null=True)
The path values, for example:
{19,21, 34, 22}
I get all Item Objects which ids are in another Item path:
qs = Item.filter(id__in=item.path)
I need to get the elements, in the order that are in the path(not taking in consideration the values in the Array).
Using order_by('path')
gives 'strange' results, because I suspect is taking in consideration all paths
and not the order of the elements in a specific path