Yi - fix bug for entity with empty related objects