[odb-users] is it possible to use same relationship table for 2
class data members ?
Lidia Kalinovsky
lidia at lemur-soft.com
Tue Dec 10 15:05:55 EST 2013
Hello
For example, something like this :
// contained object
#pragma db object
class B
{
private:
friend class odb::access;
int m;
};
// container
#pragma db object
class A
{
public:
...
private:
friend class odb::access;
#pragma db table("A_bs")
std::unordered_map<unsigned long, std::shared_ptr<B> , std::hash<unsigned
long>> m_bsMap;
std::vector<std::shared_ptr<B> > m_bs;
};
( i see solution with defining one member as transient and using db
callback functions to update/load it ).
Any advice/suggestion is really appreciated.
Thanks.
Lidia.
More information about the odb-users
mailing list