Properly map relations

Properly restore relations after committing data