Execute a transaction when use Read Slaves
For that case I'd suggest using the [execution context helper](http://docs.peewee-orm.com/en/latest/peewee/api.html#ExecutionContext).

Hard to say more, though. So you're using the "ReadSlaveModel"...may I ask what for? Do you have a large number of read replicas and a lot of database load?
 No. I just want to figure out whether some operation done when execute a transaction. Maybe when in a transaction, the ReadSlaveModel should return the  master connection.
 I'm not sure I follow, can you explain giving me a concrete example?
 We did not user orm before. In our system, we have two mysql user,  db_reader and db_writer.  We use db_reader to execute read-only statement, and db_writer execute other statement.  When use peewee, I think the ReadSlaveModel can solve this situation.  
 @hzweveryday -- thanks for the explanation of your database setup. Hmm... I know the `ReadSlaveModel` option sounds like the right solution, but I'm not sure how to go about ensuring the proper isolation between transactions/connections. This comes down to my lack of familiarity with the ins-and-outs of MySQL..

I'm not actually sure what benefits having two particular database users provides you, if your application is freely using both the reader and the writer. If they are both connected  to the same database, perhaps you could just use the db_writer exclusively?

I'd suggest that you go ahead and try using the `ReadSlaveModel` if you plan to maintain a strict separation between the two users/connections. Otherwise, I'd suggest using the connection pool with the db_writer user.
 Thank you! Now I use PooledMySQLDatabase. This should be a good solution.

When we are executing a transaction, we want the connection stay the same. But if we use Read Slaves, select will use slave connections? So, if we want use master connection, we have to instantiate the SelectQuery by hand?
