Save relations implementation.