Use mongo query to sort entities in bundles-containing and charm-related.
Restore pointer in bundles-containing responses.