          class Track(object):
              def __init__(self, order, title, duration):
                  self.order, self.title, self.duration = order, title, duration
  
              def __cmp__(self, other):
                  return (
                      self.order == other.order and
                      self.title == other.title and
                      self.duration == other.duration
                  )
 
</s> remove             def __cmp__(self, other):
 </s> add             def __eq__(self, other): </s> remove     def save_object(self, obj):
 </s> add     def save_object(self, obj, parent=None, fk_field=None): </s> remove         self.messages = message
 </s> add         if isinstance(message, dict):
            self.messages = [message]
        else:
            self.messages = message </s> remove                 setattr(self.object, accessor_name, object_list)
 </s> add                 if isinstance(object_list, ModelSerializer):
                    fk_field = self.object._meta.get_field_by_name(accessor_name)[0].field.name
                    object_list.save_object(object_list.object, parent=self.object, fk_field=fk_field)
                else:
                    setattr(self.object, accessor_name, object_list)
            def __eq__(self, other):
          class Track(object):
              def __init__(self, order, title, duration):
                  self.order, self.title, self.duration = order, title, duration
  
            def __eq__(self, other):
                  return (
                      self.order == other.order and
                      self.title == other.title and
                      self.duration == other.duration
                  )
keep keep keep keep replace keep keep keep keep keep
 One-to-one writable, nested serializer support 
rest_framework/tests/serializer_nested.py