Skip to content

Capability to add reverse lookup forieign key fields to messages #4

@GoogleCodeExporter

Description

@GoogleCodeExporter
class Model1(models.Model):
    some_field = models.IntegerField()

class Model2(models.Model):
    model1_fk = models.ForeignKey('Model1')

Would be nice to be able to do
type_map.genMsg(Model1, revers_fk_fields=[('model2', Model2])
which might result in a .proto like

Message Model1{
    optional Int32 some_field = 1;
    repeated Model2 model2 = 2; //all Model2 objects with a fk relationship
to this Model1 instance
}


Original issue reported on code.google.com by walker.z...@gmail.com on 29 Jan 2010 at 7:53

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions