[odb-users] Dynamic Database usage for scripting?
Boris Kolpackov
boris at codesynthesis.com
Tue Sep 10 08:20:06 EDT 2013
Hi Rafal,
Rafal Gm <grasmanek94 at gmail.com> writes:
> I'm just wondering know, because ODB will create the table
> "dynamic_object" for that class, but would it be possile to
> use one class for multiple tables?
No. But seeing that you've converted the column name to a string,
nothing prevents you from also converting the table name:
#pragma db object
struct name
{
std::string table;
std::string column;
};
#pragma db object
class dynamic_object
{
std::map<name, std::string> data;
};
Things will still be stored in a single table, though.
Boris
More information about the odb-users
mailing list