replace mongoid specific code to allow saving of has_many relations. tests nearly passing