          # We could try to get smart with `values_list('pk', flat=True)`, which
          # would be better in some case, but would actually end up with *more*
          # queries if the developer is using `prefetch_related` across the
          # relationship.
          relationship = super(PrimaryKeyRelatedField, self).get_iterable(instance, source)
          return [
              PKOnlyObject(pk=item.serializable_value('pk'))
              for item in relationship
          ]
  
 
</s> remove     def get_iterable(self, instance, source):
 </s> add     def get_iterable(self, instance, source_attrs): </s> remove         return self.child_relation.get_iterable(instance, self.source)
 </s> add         return self.child_relation.get_iterable(instance, self.source_attrs) </s> remove     def get_iterable(self, instance, source):
        relationship = get_attribute(instance, [source])
 </s> add     def get_iterable(self, instance, source_attrs):
        relationship = get_attribute(instance, source_attrs) </s> remove             return PKOnlyObject(pk=instance.serializable_value(self.source))
 </s> add             instance = get_attribute(instance, self.source_attrs[:-1])
            return PKOnlyObject(pk=instance.serializable_value(self.source_attrs[-1])) </s> remove             return get_attribute(instance, [self.source])
 </s> add             return get_attribute(instance, self.source_attrs)
        relationship = super(PrimaryKeyRelatedField, self).get_iterable(instance, source_attrs)
          # We could try to get smart with `values_list('pk', flat=True)`, which
          # would be better in some case, but would actually end up with *more*
          # queries if the developer is using `prefetch_related` across the
          # relationship.
        relationship = super(PrimaryKeyRelatedField, self).get_iterable(instance, source_attrs)
          return [
              PKOnlyObject(pk=item.serializable_value('pk'))
              for item in relationship
          ]
  
keep keep keep keep replace keep keep keep keep keep
 Support dotted source on relational fields 
rest_framework/relations.py