add relatedObjects method to Core and corresponding test to CoreTest