reflection: fixed cycled entity relations & improved type validation