Added exception when trying to join non-entity