insert into articles(id, slug, title, description, body, user_id, created_at, updated_at) values( #{article.id}, #{article.slug}, #{article.title}, #{article.description}, #{article.body}, #{article.userId}, #{article.createdAt}, #{article.updatedAt}) insert into tags (id, name) values (#{tag.id}, #{tag.name}) insert into article_tags (article_id, tag_id) values(#{articleId}, #{tagId}) update articles title = #{article.title}, slug = #{article.slug}, description = #{article.description}, body = #{article.body} where id = #{article.id} select A.id articleId, A.slug articleSlug, A.title articleTitle, A.description articleDescription, A.body articleBody, A.user_id articleUserId, A.created_at articleCreatedAt, A.updated_at articleUpdatedAt, T.id tagId, T.name tagName from articles A left join article_tags AT on A.id = AT.article_id left join tags T on T.id = AT.tag_id