Hi,
I have a many-to-many relationship between users and things, where a
user can select multiple things,
and a thing can be selected by multiple users. The relationship
between users and things also
contains data, so I've specifically setup a through table.
When I add a user to a thing, I guess
You can constrain uniqueness in the through table and/or the other tables to
represent whatever real-world constraints you need. Otherwise you can have as
many duplicated relationships as you want. Each through record has its own id
so the database is happy no matter how many go in.
Connected
FYI, I was able to get this working with a small change to the query, from:
data = list(TestThing.objects.all().values('user__user_data',
'thing_data',
'user__testbridge__bridge_data'))
to:
data = list(Test
3 matches
Mail list logo