Fix #1249: support relation by array attributes

Fix #1249: support relation by array attributes
Yes, it does. Mainly for the `MongoId`.