﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
2843	"serializer can't resolve a one-to-many relation from the ""foreign"" side"	nikl@…	nobody	"best illustrated with a short example:
{{{
#!python
class Reporter(models.Model):
    name = models.CharField(maxlength=25)

class Article(models.Model):
    reporter = models.ForeignKey(Reporter)
}}}

what I want to be able to get is something like the following (python-serialization):
{{{
#!python
[{'fields': {'articles': [1, 2, 3],
             'name': 'Me'},
  'model': 'news.reporter',
  'pk': '1'}]
}}}

currently, if I want to get the information in this format, I have two options:
 * construct a Model-like structure, so it can be used with the serializers
 * turn the one-to-many into a many-to-many relationship
both of these are obviously not a clean solution...

therefore I'd propose to add an extra parameter to export the ids of those related-objects optionally.

if time allows and there are no objections to this, I'll try to throw together a patch this weekend."	New feature	closed	Core (Serialization)		Normal	wontfix	serialize json python xml foreign key one to many relationship		Accepted	1	1	1	1	0	0
