[relationships] fixed auto-attaching to repository