Added support to generic relations