relationship mapping; error handling