I'm not sure how I could do that because I'd want to set active to 0 only on 
the students that are no longer going to school here.

Maybe merge isn't the right thing to do, or maybe I need to rethink my 
algorithm.  The bottom line is I need to know what records get added to the 
local database table (new users),  what ones were active before -- but now I 
don't see them in the query (disable users), and what records were changed 
(modify/update users).

What I'm trying right now is to use session.expunge() on each active 
student, THEN merge the data from the SIS.  That way (I hope) that only 
records that changed or added would be "dirty" with an active attribute of 1 
and the dirty objects with an attribute of 0 would need to be removed.

If anyone has a bright idea I'm all ears.  I just don't know SA well enough 
to know all the tools available to me for this.

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sqlalchemy/-/Qk7ieEmaC98J.
To post to this group, send email to [email protected].
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.

Reply via email to