Page 1 of 1

QxORM Connection Provider

PostPosted: Wed Dec 07, 2011 10:48 pm
by zbenjamin
Hello,

i'm currently looking for a good Qt based ORM solution for my next project
and i came across QxtORM. It looks very promising but there is one small
problem.

I'm going to implement a Webservice Application on top of a qt application server.
This server provides a connection pool and uses a randrom free connection from that pool.
Is it possible to "tell" QxORM which connection to use?

regards zbenjamin

Re: QxORM Connection Provider

PostPosted: Thu Dec 08, 2011 7:57 am
by QxOrm admin
Yes you can ! :)

All functions into namespace qx::dao provides an optional parameter of type QSqlDatabase from QtSql Qt module.
So, you can use your own connection to communicate with database (from a connection pool for example).

You can also use your own connection if you want to work with a session (QxSession class).
For more details about session, you can go in the FAQ of QxOrm website :
http://www.qxorm.com/qxorm_en/faq.html#faq_170

Re: QxORM Connection Provider

PostPosted: Thu Dec 08, 2011 8:59 am
by Guest
Aaaa ic, i should have read the documentation a littlebit better ;).
So there is no need for me to initialize the QxSqlDatabase singleton thats good.
I already feared it maybe needs lots of time to initialize the Library when i pass it the Database Object.

Thanks for your help ;)