In response to:
> b = Blog.objects.get(id=1)
> [ I do some other things here, and meanwhile the title of blog with
> id=1 was changed]
> for entry in b.entry_set.all():
> entry.blog is b # Is this still true?
> entry.blog.title is b.title # How about this?
I understand how this could hap
On Fri, Feb 09, 2007 at 04:35:37AM -, Gary Wilson wrote:
>
> On Jan 29, 4:25 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> > b = Blog.objects.get(id=1)
> > for entry in b.entry_set.all():
> > entry.blog is b # True
>
> So what if the blog with id=1 changes in between ac
On Feb 8, 11:10 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Does anyone else have any thoughts on this?
Oh, and I forgot to mention that there is a similar ticket wanting the
same thing for select_related:
Ticket #17 - Metasystem optimization: Share select_related in memory
http://code.d
On Jan 29, 4:25 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> b = Blog.objects.get(id=1)
> for entry in b.entry_set.all():
> entry.blog is b # True
So what if the blog with id=1 changes in between accesses? What if I
had
b = Blog.objects.get(id=1)
[ I do some other things
Does anyone else have any thoughts on this?
On Jan 29, 4:25 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> It's a lot more efficient, for one.
>
> select_related() generates more code to query the database. It also
> goes as "far as possible", so if the blog has a lot more relationships
>
It's a lot more efficient, for one.
select_related() generates more code to query the database. It also
goes as "far as possible", so if the blog has a lot more relationships
to it or if the entries have a lot more relationships to them, then
select_related would be pretty inefficient especia
On 1/28/07 8:42 PM, [EMAIL PROTECTED] wrote:
> i just wanted to spark some discussion of #3369. i implemented it and
> would like to see it get included.
>
> here's an example of what reverse caching of foreign keys would mean:
>
> b = Blog.objects.get(id=1)
> for entry in b.entry_set.
i just wanted to spark some discussion of #3369. i implemented it and
would like to see it get included.
here's an example of what reverse caching of foreign keys would mean:
b = Blog.objects.get(id=1)
for entry in b.entry_set.all():
entry.blog # No database access required.
c