rohitjain-rj / django-tagging

Automatically exported from code.google.com/p/django-tagging
Other
0 stars 0 forks source link

update_tag does not work with Oracle #191

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When using Tagging-trunk, Django-trunk and cx_Oracle-4.4.1, I can add tags
when a model is created, but I can't update/delete tags. The tags
originally added with the model instance remain, but can't be
updated/deleted :(

Original issue reported on code.google.com by btaylord...@gmail.com on 23 Mar 2009 at 8:54

GoogleCodeExporter commented 9 years ago
Could you please post some example code that reproduces the problem in your 
environment?

I've just re-factored the entire unit test suite in tagging/tests/tests.py to 
be in
individual test cases instead of one amorphous doctest blob.  The only failure 
that I
get with Oracle is when someone tries to limit the number of results contained, 
in
this line

>>> TaggedItem.objects.get_related(l1, Link, num=1)
[<Link: link 2>]

Original comment by anb...@gmail.com on 20 Aug 2009 at 9:15

GoogleCodeExporter commented 9 years ago
Hi. I no long have access to any of the source code for that project, as I've
switched companies, but it was something with the caching if I remember 
correctly.

Original comment by btaylord...@gmail.com on 20 Aug 2009 at 9:17

GoogleCodeExporter commented 9 years ago
Looks like it's working nowadays:

aball@helper:django_tagging_test_project 18:01:48 $ python manage.py shell
Python 2.5.2 (r252:60911, Jan  4 2009, 17:40:26) 
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from tagging.tests import models
>>> dead_parrot = models.Parrot.objects.create(state='dead')
>>> from tagging.models import Tag, TaggedItem
>>> Tag.objects.update_tags(dead_parrot, 'foo bar')
>>> Tag.objects.get_for_object(dead_parrot)
[<Tag: bar>, <Tag: foo>]
>>> Tag.objects.update_tags(dead_parrot, 'shiny, new')
>>> Tag.objects.get_for_object(dead_parrot)
[<Tag: new>, <Tag: shiny>]
>>> 
aball@helper:django_tagging_test_project 18:04:02 $ python manage.py shell
Python 2.5.2 (r252:60911, Jan  4 2009, 17:40:26) 
[GCC 4.3.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from tagging.tests import models
>>> from tagging.models import Tag, TaggedItem
>>> Tag.objects.get_for_object(models.Parrot.objects.all()[0])
[<Tag: new>, <Tag: shiny>]
>>> Tag.objects.get_for_object(models.Parrot.objects.get(state='dead'))
[<Tag: new>, <Tag: shiny>]
>>> 

Original comment by anb...@gmail.com on 20 Aug 2009 at 10:06

GoogleCodeExporter commented 9 years ago
This is with Django 1.0.2, cx_Oracle 5.0.2 and revision 156 of the trunk of
django-tagging.

Original comment by anb...@gmail.com on 20 Aug 2009 at 10:09