python - SQLAlchemy Event interface -


I am using SQLAlchemy 0.7. I should have some 'post processing' after the session.flush () i.e., i need to access the examples which are included in flush () and iterate again Make them The flush () call will update the database, but in some instances, some data is also stored in the LDAP database, I need to trigger an call using an instance method to write an update in an LDAP database like a SQLLame.

I thought I am using after_flush (session, flush_context) event, wide, but how do I list the update () 'd frequencies Can I get it?

On one side, how can I decide which columns have changed (or 'dirty') on an example? I have been successful in knowing that a complete example is dirty, But not personal qualities

According to:

Note the status of the session still Is in pre-flush, i.e. "new", "dense" ?????, and has been removed? The list still shows the history setting on the pre-flush state as well as the example setting.

This means that you should be able to use all the dirty objects in the session.dirty list that you note that the event The first parameter of the callback is the current session object.

For the second part, you can use the function to find out which columns have changed. It returns an object for a special attribute containing the has_changes () method.

If you are trying to listen for changes on specific class attributes, consider using instead.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -