onyb / reobject

Python without ifs and buts - an ORM layer for Python objects, inspired by Django
Apache License 2.0
81 stars 8 forks source link

Implement model relationships #5

Open onyb opened 7 years ago

onyb commented 7 years ago

Django-style many-to-many relationships is a highly desirable feature. There might be some refactoring involved in reobject.manager.Manager.

class Publication(models.Model):
    def __init__(self, title):
        self.title = title
class Article(Model):
    def __init__(self, headline):
        self.publications = models.ManyToManyField(Publication)
        self.headline = headline

ReObject should allow the following usages: