Added support for relationship persistence into repository