Hi Michael,
thanks for the reply.
I thought I had tested the code, but I did not do so properly.
The essence of the logic I posted works. Here are the few corrections:
You are right that I should not use strings for partition_id when it is
defined as integer. This is a piece of test code I cook
not to mention you're using strings to set integer values, again a bad idea,
can only confuse your database:
part.partition_id = '345' # <-- this is a string
partition_id = sa.Column(sa.Integer, nullable=False) # <-- should be integer
with this program you need to create a short test case th
the code there doesn't seem to show anything that would result in any DELETEs
emitted. a DELETE here would only occur if you deassociated a TestDevice and
a TestPartition by removing from the TestDevice.partitions collection or
setting a TestPartition.device to None, and I don't see that. Al
I had asked this question on Stack Overflow. The details are at this link:
http://stackoverflow.com/questions/24836816/updating-a-few-children-in-one-to-many-relationship-deletes-all-rows-and-adds-ne
The summary is I have a parent class A and a bidirectional one-to-many
relationship with class B