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-many-to-many-mappings

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