What do you mean by โparental context limitsโ? To get the index of an object in the list, you need to download it earlier. If you want to get an index without loading Parent, then you need to use raw SQL for this, but I'm not sure that it will be faster than loading Parent, because it is the same logic, except that the display of results for the model is available.
Btw, to get this index, when you have a Parent
instance, you should use:
int idx = parent.children.indexOf(child)
And don't forget to implement the .equals
your Child
domain.
source share