Edited the method for getting objects from basicdbobjects