parent_pk = getattr(item, '%s_id' % item_opts.parent_attr)
item.parent = by_pk[parent_pk]
item.parent._cached_children.append(item)
parent_pk = getattr(item, '%s_id' % item_opts.parent_attr)
item.parent = by_pk[parent_pk]
item.parent._cached_children.append(item)