Revision history [back]
Not sure what your intention is. The safest approach is to use function user.post_answer()
. There are also post_question()
and post_comment()
- those will take care of all the underlying records and will test the permissions.
If you want to follow the underlying mechanics - basically any time a foreign key relation to another object - that one has to be created first. In this case - answer object is created first, then we create the revision, because revision requires the foreign key to the answer post.
Not sure what your intention is. The safest approach is to use function user.post_answer()
. There are also post_question()
and post_comment()
- those will take care of all the underlying records and will test the permissions.
If you want to follow the underlying mechanics - basically any time a foreign key relation to another object - that one has to be created first. In this case - answer object is created first, then we create the revision, because revision requires the foreign key to the answer post.