change key setter and add inverse_of to associations