Can I use an id instead of reference object?
- Code: Select all
BlogPtr blogPtr(new Blog);
blogPtr->authorPtrX = authorPtr;
blogPtr->blog_text = "";
blogPtr->....
qx::dao::insert_with_all_relationship(blogPtr);
Do I have to get authorPtr first by another query? It's too slow. Can I use an int id of author instead of authorPtr object?