[odb-users] How to make an object map to another table (same table structure) ?

saigut saigut at qq.com
Mon Sep 2 05:58:48 EDT 2019

Hi all:

Is it possible map a object to another table which has same table structure as the original one?

Say I have a object class named "user_info":
#pragram ......
calss user_info {
    int user_id;
    vchar user_name;
    int user_age;

And have such two table:
int user_id, vchar user_name, int user_age

int user_id, vchar user_name, int user_age

Can I set object of class 'user_info' map to 'user_info_01' or to 'user_info_02' ?

In my actual case, my program is going to create one table everyday which have the same table structure,
those tables are only different in table name. So I want to operate those talbes with one class, because the 
names of all those tables are generate dynamically, I can't create classes for every table.

Any help is appreciated.

Tony Saigut
saigut at qq.com

More information about the odb-users mailing list