Hello,

I'm running into the same issue as you.

i'll try to be a bit more specific:
i my case, it seems the trouble lies in tag removing:
only one tag on two is actually removed each time,

i've no problem with adding tags to page, but removing all four tags
of one page will remove the first and third tags of the page but not
the second neither the fourth.

i did try as you suggest to had a meta.Session.commit() between the
two loop but it doesn't make any change.

btw i'm using pylons 1.0 instead of 9.7 in the book, so i had some
change to do, and maybe i missed something...

did you find where it goes wrong since you posted this message?

Thank you
Yohann


On Oct 8, 3:40 pm, Stratos Papadopoulos <[email protected]> wrote:
> Hello All,
>
> I have a problem in updating the association table in a 'many to many'
> relationship. I followed the example SimpleSite pylons app described
> in the book.
>
> More specifically the code in:
>
> http://pylonsbook.com/en/1.1/simplesite-tutorial-part-2.html#tags-man...
>
> and the update_tags() action. This code (the two loops) in my case
> does not always update
> correctly the association table (I have not managed to find the exact
> conditions though).
> The code logic in the book looks ok (the first loop removes from the
> table the tags that have been
> deleted from the page, and the second loop adds those tags, that not
> already exist in the table),
> however I cannot find a logical meaning for the variable tags_to_add,
> that is initialized in
> the action and never used anywhere.
>
> Internet search did not lead to anything. Has anyone used the code and
> checked that it works?
> Is a session.commit() necessary between the two loops?
>
> Thanks in advance.
>
> Stratos,

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to