I have a pair of objects which share a relationship. The relationship is currently defined with dynamic_loader, and is a one:many. One particular use-case is this:
objectA.things_of_type_B = list() which appears to work, sorta. When I manipulate objects of type B like this: B.a_thing = an_instance_of_A (this is the backref from the dynamic_loader) sqlalchemy re-loads the things_of_type_B relationship. if I do it this way: objectA.things_of_type_B.delete() then things work great. If I were to use the relationship, 'things_of_type_B' for adding and removing individual items (without using the backref) I'd use it like this: objectA.things_of_type_B.append( instance_of_type_B ) Now, to the meat of the question: I'm curious why objectA.things_of_type_B = list() sorta-kinda appears to work, but doesn't - and doesn't raise an error, either. I probably *am* doing it wrong, but it doesn't *tell me* I'm doing it wrong. NOTE: originally, the relationship between A and B was not defined by dynamic_loader but a relation (also w/backref), but having the ability of making a Query out of is pretty handy... -- Jon --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" 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/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---
