I have two classes with relation n-1 like this:
- Code: Select all
class A
{
public:
long id;
QSharedPointer< B > b;
};
class B
{
public:
long id;
QList< QSharedPointer< A > > a_list;
};
typedef QSharedPointer< B > BPtr;
can i delete record from both tables at once( like delete_by_id_with_all_relations ) or i must do something like following:
- Code: Select all
BPtr b( new B );
b->id = < id_to_delete >
qx::orm::fetch_by_id( b );
qx::orm::delete_by_id( a_list )
qx::orm::delete_by_id( b );
Thanks.