When serializing objects relationshipClass is false so don't proceed in that case.