On Tuesday, February 22, 2011 9:35:18 PM UTC, mm wrote: > > the next field in the Entry table contain the name of the next entry > the prev field in the Entry table contain the name of the previous > entry. > > current_entry = Entry.objects.get(id=10) > > next_entry = Entry.objects.get(next=current_entry.next) > prev_entry = Entry.objects.get(prev=current_entry.prev) > > For business reason, we used the name of the entry instead of the ID. > > OK. Now think about the query you're making.
"Give me the Entry object where the 'next' field is the same as the current entry's 'next' field". Can you see why that's giving you the wrong answer? -- 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.