Page 1 of 1

QxOrm and classes in namespaces

PostPosted: Wed Jan 23, 2013 7:29 pm
by eli
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

Re: QxOrm and classes in namespaces

PostPosted: Thu Jan 24, 2013 8:15 am
by qxorm
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

Re: QxOrm and classes in namespaces

PostPosted: Thu Jan 24, 2013 10:41 am
by eli
:oops:
I missed that second faq entry. Sorry for that.

Thanks for the quick reply!
eli