1、先看下文档
merge
(instance, load=True)
Copy the state of a given instance into a corresponding instance within this Session
.
Session.merge()
examines the primary key attributes of the source instance, and attempts to reconcile it with an instance of the same primary k