Re: ManyToMany automatic caching

2005-08-24 Thread adrian
... actually I guess this isn't much of a problem for most people, since these instances will probably actually have very short lived scopes. But it would sure be a mistake to use django.core.cache to cache one of these objects.

ManyToMany automatic caching

2005-08-24 Thread adrian
Models with ManyToMany relationships cache related objects over that relationship in an instance attribute. For example if my model class 'salad' has a ManyToMany to my model class 'soup', then my 'caesarsalad' instance will have an attribute called '_soups_cache' and when I call "caesarsalad.get

Re: Accessing/creating addition fields on cross-reference tables?

2005-08-24 Thread Adrian Holovaty
On 8/24/05, John Madson <[EMAIL PROTECTED]> wrote: > How do you add or access an additional field to the cross-reference > table generated by a ManyToManyField? For example, if I have an xref > table that looks like: > > `id` mediumint(9) unsigned NOT NULL auto_increment, > `foo_id` int(11) NOT N

Accessing/creating addition fields on cross-reference tables?

2005-08-24 Thread John Madson
How do you add or access an additional field to the cross-reference table generated by a ManyToManyField? For example, if I have an xref table that looks like: `id` mediumint(9) unsigned NOT NULL auto_increment, `foo_id` int(11) NOT NULL default '0', `bar_id` int(11) NOT NULL default '0', `baz` v