QxOrm and classes in namespaces

Forum for posting problems using QxOrm library

QxOrm and classes in namespaces

Postby eli » Wed Jan 23, 2013 7:29 pm

Hello,

I'm trying to use QxOrm in combination with classes in namespace, but I run into a problem.

When I'm doing this on an Sqlite database:
Code: Select all
QSqlError daoError = qx::dao::create_table<SYN::Building>();


Then I get this error:
Code: Select all
[QxOrm] qx::QxSqlDatabase : create new database connection in thread '1936' with key '{7a17fad7-c8f8-4177-945d-b6185e801277}'
[QxOrm] execute sql query failed : CREATE TABLE SYN.Building (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, name TEXT, street TEXT, village TEXT, postalcode SMALLINT, country TEXT)
Unable to execute statement
unknown database SYN


The problem seems to be the 'SYN.Building' construction. When I do not put the Building class in a namespace, then everything works fine.

Any ideas?
Thanks,
eli
eli
 
Posts: 2
Joined: Wed Jan 23, 2013 7:20 pm

Re: QxOrm and classes in namespaces

Postby qxorm » Thu Jan 24, 2013 8:15 am

Hi,

Please read the FAQ ;)

About classes and namespace : http://www.qxorm.com/qxorm_en/faq.html#faq_150
And about SQL schema creation : http://www.qxorm.com/qxorm_en/faq.html#faq_230
qxorm
Site Admin
 
Posts: 481
Joined: Mon Apr 12, 2010 7:45 am

Re: QxOrm and classes in namespaces

Postby eli » Thu Jan 24, 2013 10:41 am

:oops:
I missed that second faq entry. Sorry for that.

Thanks for the quick reply!
eli
eli
 
Posts: 2
Joined: Wed Jan 23, 2013 7:20 pm


Return to QxOrm - Help

Who is online

Users browsing this forum: No registered users and 7 guests

cron