Without a lot of build up I'm realizing that I'm going to have to do a lot of manual prep work to make these guys work. Particularly with delete it would appear. Will I have to implement custom onBeforeDelete operations for these objects? What would those functions look like? Below is where I'm currently at and admittedly struggling through this concept.
- Code: Select all
void Project::onBeforeDelete(qx::dao::detail::IxDao_Helper * dao)
{
qx::QxSqlQuery query("WHERE t_qxee_User_Project.project_id = :key");
query.bind(":key", m_Project_ID.toString());
if (!qxTryCatch(qx::dao::execute_query(query, dao->database())))
{
qx::QxInvalidValueX msg;
msg.insert("Unable to detach project from user accounts!");
dao->addInvalidValues(msg);
}
}