I'm not certain of the answer to that - the easiest thing is probably
just to try it.
Remember that session.merge() doesn't modify the instance that you
pass in - it returns a different instance associated with the target
session, so code normally looks more like this:
u_source = User(id=1)
Probably what is abstruse here is the jargon emitting history events, is
it something as a newbie must understand in order to use Session properly?
As a beginner should I know this before studying Session section? I'd
appreciate some insight from pros. Thanks.
On Tuesday, July 15, 2014 5:57:59
SQLAlchemy events (see
http://docs.sqlalchemy.org/en/rel_0_9/core/event.html) are a
relatively advanced feature that allows you to hook in to various
operations that occur within the library. I think history events in
this context refers to attribute events
For example, if I have User class which is mapped to user table. In user
table there is a single row, whose id (primary key) equals 1, like this:
id | name | gender | address
1 John male second best bathroom street, toilet#2
now I have this code:
u = User(id=1)