Hello,
You can execute custom SQL queries like this :
- Code: Select all
QSqlError err = qx::dao::call_query(qx_query("UPDATE table SET datecol=date('now')"));
More details in the QxOrm manual here :
http://www.qxorm.com/qxorm_en/manual.html#manual_3610About putting a date/time on each insert/update, you could also try to use triggers :
http://www.qxorm.com/qxorm_en/manual.html#manual_4101 solution if you want this behavior for all your persistent classes is to define a base class with a property date, then implement insert/update triggers to put a date value.
Then, triggers (defined in the base class) are called automatically when you insert/update any entities.
Another solution could be to create insert/update triggers on database side.