StupidBeauty
Read times:816Posted at:Thu Nov 28 05:30:08 2013
- no title specified

转载:Help with Dbo

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 ...

潘晓婷

Your opinions
Your name:Email:Website url:Opinion content:
- no title specified

HxLauncher: Launch Android applications by voice commands