On Aug 18, 9:49 pm, Ray <raymend...@gmail.com> wrote:
> I know in the backend, a manytomany relationship is essentially a join
> table, but there seems to be no easy way to delete relationships from
> it. The only remove option is made only for ForeignKey relationships.
> Is there a workaround? Why would django design a relationship that you
> can only add but not delete?

The wording in the documentation here:
http://docs.djangoproject.com/en/dev/ref/models/relations/
is potentially confusing. The top of the page clearly states that the
methods are available both for foreignkeys and many-to-many
relationships. However, remove() and clear() state that they are "only
available on ForeignKeys where null=True". I believe this should just
read "for FKs, these methods are only available where null=True" - in
other words, they are available as you would expect for ManyToMany.
--
DR.
--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to