After merge() returns, is there a way for me to pair each object in
the returned merge_obj with the object it was created from?

For example:
merged_obj = session.merge(object)

At the top level, it is trivial, merged_obj was created because of the
instance "object"

For single RelationProperties under the top level, it is fairly
simple, too.

That is:

merged.childattr was merged from object.childattr

Where it falls apart I think is if the RelationProperty.use_list ==
True

merged.list came from object.list, but is there a way for me to
reference the original objects inside the list.

Did merged.list[0] come from object.list[0] or object.list[1] or
object_list[2]?

I particularly can't use the pk because it won't always be set (often
this will be a new record)

Any suggestions?

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to