Added the addRelations method to speed up the adding of many relations