Am Montag, 27. Dezember 2010, um 22:54:02 schrieb Koen Deforche:
> Hey Jan,
>
> Your code looks fine, except for one problem which seems to be a
> design mistake in our API since you are not the first to make the same
> assumption:
>
> 2010/12/27 Jan Köster <[email protected]>:
> > TuxistApp::TuxistApp(const Wt::WEnvironment& env)
> > : Wt::WApplication(env)
> > {
> > Wt::Dbo::backend::Postgres db_con(getenv("TUXCMS_SQLCONFIG")); //will be
> > replaced agqainst multi db support
> > db_con.setProperty("show-queries", "true");
> > Session = new Wt::Dbo::Session;
> > Session->setConnection(db_con);
>
> The connection object should outlive the session object (i.e. should
> be on the heap as well). We will at least make this more evident in
> the documentation, and perhaps modify the API to avoid the confusion
> related to this !
>
> Regards,
> koen
>
> ---------------------------------------------------------------------------
> --- Learn how Oracle Real Application Clusters (RAC) One Node allows
> customers to consolidate database storage, standardize their database
> environment, and, should the need arise, upgrade to a full multi-node
> Oracle RAC database without downtime or disruption
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> witty-interest mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/witty-interest
i have solve this problem now i have problem with this template:
template<>
struct Wt::Dbo::dbo_traits<Twitter> : public Wt::Dbo::dbo_default_traits {
static const char *versionField() {
return 0;
}
};
i got from gcc this:
In file included from
/local/administrator/projects/tuxist/twitter/src/twitter.cpp:21:
/local/administrator/projects/tuxist/twitter/src/twitter.h:79: error:
specialization of ‘Wt::Dbo::dbo_traits<Twitter>’ after instantiation
/local/administrator/projects/tuxist/twitter/src/twitter.h:79: error:
redefinition of ‘struct Wt::Dbo::dbo_traits<Twitter>’
/usr/include/Wt/Dbo/ptr:207: error: previous definition of ‘struct
Wt::Dbo::dbo_traits<Twitter>’
make[2]: *** [src/CMakeFiles/twitter.fcgi.dir/twitter.o] Fehler 1
make[1]: *** [src/CMakeFiles/twitter.fcgi.dir/all] Fehler 2
make: *** [all] Fehler 2
what is the problem ?
best Regards,
Jan
------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web. Learn how to
best implement a security strategy that keeps consumers' information secure
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest