Skip to content

Relation tagged with through model doesn't work as expected #14

@frmdstryr

Description

@frmdstryr

With models like

class User(Model):
    groups = Relation(lambda: Group).tag(through=lambda: UserGroup)

class Group(Model):
   # ...

class UserGroup(Model):
    user = Instance(User)
    group = Instance(Group)

I should be able to just filter by User.objects.filter(group=group) which should figure out from the through model that it should filter by user_group.group == group

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions