handle custom foreign keys in autogenerated serializers