Fix #1249: support relation by array attributes

Fix #1249: support relation by array attributes