add relation in integration, portable query for relations