Move metadata definition for relationship entity to its class.