How to define table name

Forum for posting problems using QxOrm library

How to define table name

Postby nickla » Tue Jul 17, 2012 9:51 am

As i understand QxOrm gets table name from business model name. I use camel case formating in my project and want to use different model name from database table name. How can i set table name from business model?
nickla
 
Posts: 52
Joined: Wed Jul 11, 2012 4:19 pm
Location: Russia

Re: How to define table name

Postby nickla » Tue Jul 17, 2012 9:53 am

nickla
 
Posts: 52
Joined: Wed Jul 11, 2012 4:19 pm
Location: Russia

Re: How to define table name

Postby QxOrm admin » Tue Jul 17, 2012 12:11 pm

Hi,

Can i use http://www.qxorm.com/doxygen/html/class ... 97b18400f6 this for it (setName function)?

Yes !

Here is another topic with the same question : http://www.qxorm.com/forum/phpbb/viewto ... 8a8c3980a2
And here is the solution :
Code: Select all
namespace qx {
template <> void register_class(QxClass<my_class> & t)
{
   t.setName("TABLE_NAME");
   //...
}}
QxOrm admin
 

Re: How to define table name

Postby nickla » Tue Jul 17, 2012 1:42 pm

Thank you.
nickla
 
Posts: 52
Joined: Wed Jul 11, 2012 4:19 pm
Location: Russia


Return to QxOrm - Help

Who is online

Users browsing this forum: No registered users and 5 guests

cron