Handle entity relations.