check relation_metadata in condition

Fix #137