I have two tables. One table contains comments for posts, the other contains comments such as an alias, site, etc. Relations between the two tables exist FK Comment .CommenterId β Commenter.Id Whenever a user submits a comment, I need to add a comment and a commenter at the same time. The problem is that I donβt know what Commenter.Id will be after adding to assign it Comment.CommenterId before adding.
What is the best practice for such inserts?
source
share