Add a test case for relations during attach