> So, if article 1 is related to article 2.. then there should be two > rows in the articles_related_articles table like: > > 1 2 0 > > 2 1 0
Not sure to understand.I can't see where you handle both direction (1=>2, 2=>1) in your code. As expected, there's only one row in the db. > I am doing this in the shell, but its not working as expected.[...] > related_id is always getting > overrideen to NULL, even though I have it specified while creating the > object. About related_id overridden, I think it may be a problem about sessions. Are you sure session in "session.flush()" is the same as context.current (context beeing used in assign_mapper) ? Attached is script using assign_mapper only. related_id is set correctly. Cheers Seb -- Sébastien LELONG http://www.sirloon.net sebastien.lelong[at]sirloon.net --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---
articles.py
Description: application/python