Page 1 of 1

Way to map table name and class name

PostPosted: Mon Nov 16, 2015 8:30 am
by behtgod
Is there a way to map table name and class name?
For example,
I have a class is named ClassA,and I have a table is named TableA.
I want ClassA is mapping with TableA instead of create a new class that name TableA.

Re: Way to map table name and class name

PostPosted: Mon Nov 16, 2015 8:59 am
by qxorm
Hello and welcome to this forum :)

Is there a way to map table name and class name?

Yes there is a way, in your qx::register_class<T>() method, just use :
Code: Select all
t.setName("TableA");


For this kind of questions, I would recommend to test QxEntityEditor application : this application includes an entity designer, and you are able to modify entity parameters and then see how C++ should be with the C++ preview tab.

Re: Way to map table name and class name

PostPosted: Mon Nov 16, 2015 10:03 am
by behtgod
qxorm wrote:Hello and welcome to this forum :)

Is there a way to map table name and class name?

Yes there is a way, in your qx::register_class<T>() method, just use :
Code: Select all
t.setName("TableA");


For this kind of questions, I would recommend to test QxEntityEditor application : this application includes an entity designer, and you are able to modify entity parameters and then see how C++ should be with the C++ preview tab.


Thank you very much!