If you are sure that your
authorPtr already exists into database, I think that you can set only the ID => It would work...
You can also imagine to fetch all authors in your program and then store all of them into the cache.
Then you will not have to fetch your author a second time because it is already in the cache.
And to update your cache each time you make a modif on
author table, you can use QxOrm trigger to be sure that your cache is up-to-date.
But there is other ways to optimize your program...
For more details about
qx::cache :
http://www.qxorm.com/qxorm_en/faq.html#faq_220For more details about
triggers :
http://www.qxorm.com/qxorm_en/faq.html#faq_130