My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 67: Can't get node count
3 people starred this issue and may be notified of changes. Back to list
Status:  Chatting
Owner:  ----


 
Reported by ezequiel...@gmail.com, Feb 3, 2010
What steps will reproduce the problem?
1. Use the following model in a new app: http://pastebin.com/mc1a0fb1
2. python manage.py shell
3. Category.tree.add_related_count(Category.tree.root_nodes(), Item,
'category', 'q_c', cumulative=True)
4. Get error: http://pastebin.com/m69ed1937

I'm using SVN version, django 1.1, Ubuntu 9.10

I'm not sure if this is a bug. I'm still learning to use mptt.

Feb 5, 2010
#1 ezequiel...@gmail.com
I tried using a ForeignKey, just to have an exact match with the example given in the
book, and it seems it works. So the problem seems to be with ManyToMany relations.
Sep 3, 2010
#2 matjaz.c...@gmail.com
Could you please test with the latest stable version?
Sep 10, 2010
Project Member #3 craig.ds@gmail.com
Tested using latest version of django-mptt with:

 * django 1.1
 * SQLite
 * Ubuntu 8.04

Unable to reproduce, assumed fixed. Comment if you're still getting this error and we'll reopen.
Status: Fixed
Sep 15, 2010
#4 agabel
I'm getting a similar error with postgresql.

Django 1.2
PostgreSQL
CentOS
Sep 16, 2010
Project Member #5 craig.ds@gmail.com
Hi agabel

What version of django-mptt and PostgreSQL are you using?
Status: Chatting
Oct 7, 2010
#6 agabel
Django 1.2
PostgreSQL 8.1

It looks like we are both trying to get a count from a ManyToMany.  The sql that is created cannot handle this type of relation.

Powered by Google Project Hosting