I have a mapper like this: mapper(Request, request_table, properties={ [SOME MORE STUFF] 'stock': relation(Stock, lazy=True, uselist=False, primaryjoin=and_( request_table.c.id_item==stock_request.c.id_product, request_table.c.id_location==stock_request.c.id_location, request_table.c.id_stocktype==stock_request.c.id_stocktype), foreign_keys=[request_table.c.id_item, request_table.c.id_location, request_table.c.id_stocktype])})
Whenever I remove a request object that has a stock object associated, it deletes the stock object too. When I change the foreign_keys to stock_request.c.id_product, stock_request.c.id_location, stock_request.c.id_stocktype it tries to update the related object with NULL values. But I want it to not do anyithing at all! I played with the cascade rules, but they all either delete or update. Thanks! Koen --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---