Hello folks, I'm playing around with using assign_mapper inside of a Turbogears projects, and I ran into a small problem. My assign_mappers work fine for taking things out of the database, but if I pull an object out, and add a pre-existing element(say a user to a session) to a relation and then attempt to put them back, I get errors about key conflicts because sqlalchemy attempts to insert the pre-existing elements, causing key conflicts. I can get around this by just manipulating the secondary join tables manually, but the assign_mappers are so cool, I would love to be able to change things around to get them working.
Here's my model building code. What I'm doing here is using a dictionary describing the relations to set up my assignmappers in order to use secondary joins. There's some stuff that I cut out here to make things more readable, so this code won't run, but if anybody is interested I can provide the whole thing. http://euler.cs.umb.edu/pastes/model.html Here's the code where I'm attempting to acces the database and getting into trouble: http://euler.cs.umb.edu/pastes/access.html Here's the stack trace: http://euler.cs.umb.edu/pastes/ Thanks, Alex --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---