[odb-users] Variant type mapping?
Boris Kolpackov
boris at codesynthesis.com
Sun Apr 8 04:20:50 EDT 2012
Hi Luis,
Luis Valdés <luisvaldes88 at gmail.com> writes:
> class Whatever
> {
> public:
> long m_id;
> QByteArray m_variantData;
> };
>
> namespace qx
> {
> template <> void register_class(QxClass< Whatever> & t)
> {
> t.id(& Whatever :: m_id , "id");
> t.data(& Whatever :: m_variantData , "variantData");
> }
> }
In ODB, this will be just:
#pragma db value
class Whatever
{
public:
long m_id;
QByteArray m_variantData;
};
No registration required ;-).
Boris
More information about the odb-users
mailing list