
Wt::Dbo中,connection对象跟session对象一样,在多个对象之间共享时需要长期存在。
http://redmine.webtoolkit.eu/boards/2/topics/1100
亮点:
Hey,
Since you are the second person with a similar problem, I believe we may have actually made a mistake designing the API:
Session::setConnection(SqlConnection& connection)
should probably have had the signature:
Session::setConnection(SqlConnection *connection)
since this makes it more explicit that the connection object is passed by reference and should outlive the session object !
So you need to keep the connection around (store it also in your application instance).
Perhaps it is not too late to deprecate one API for the other ...
潘晓婷
HxLauncher: Launch Android applications by voice commands
