When you use a ManyToMany field, a "private" table (not tied to a
model like other tables) is created in the database with something
like the following (created via the contrib.auth.User's
user_permissions field:
id, user_id, permission_id

If you wanted to create your own table that mirrors this one (i.e. has
two fields, "user" and "permission"), then you have the equivalent of
ManyToMany. You can also add other fields (e.g. "order"). The big
difference between this approach and using M2M are the methods you use
to access information in those tables, otherwise they are equivalent.
In fact, if you have an existing M2M field you can convert it to this
approach without much difficulty.

HTH,
 -rob

On Jul 28, 11:00 am, "Cole Tuininga" <[EMAIL PROTECTED]> wrote:
> Hey all - I was hoping I could solicit some help with a model design.
> I'm using 0.96 rather than the svn version at the moment.
>
> I'm working on a website for my wife that is intended to help with
> taking registrations for a conference.  The idea is that each workshop
> in the conference has a "timeslot" attribute.  Obviously, multiple
> sessions can point at the same timeslot.  Timeslots are also models so
> that as the conference is organized, my wife can alter them through
> the admin interface.
>
> When a person registers, they are asked to select their top three
> choices of workshops for each timeslot.  The thing is that as the
> timeslots are variable, I'm having trouble figuring out how I should
> set up the relationship between the attendee and the selected
> workshops.
>
> I could do something like a simple many to many relationship in the
> attendee model, but that doesn't indicate ordering (most preferred to
> least preferred) per timeslot.
>
> Have I explained this well enough?  Anybody have thoughts?
>
> --
> Cole Tuiningahttp://www.tuininga.org/


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to