def handle_m2m_field(self, obj, field):
        if field.creates_table:
            self._start_relational_field(field)
            for relobj in getattr(obj, field.name).iterator():
                self.xml.addQuickElement("object", attrs={"pk" : smart_unicode(relobj._get_pk_val())})
            self.xml.endElement("field")
Called to handle a ManyToManyField. Related objects are only
dataset/ETHPy150Open dcramer/django-compositepks/django/core/serializers/xml_serializer.py/Serializer.handle_m2m_field