Tag

saveOrUpdate

1 views collected around this technical thread.

Top Architect
Top Architect
Oct 16, 2022 · Backend Development

Using MyBatis-Plus saveOrUpdate with UpdateWrapper and QueryWrapper

This article explains how MyBatis-Plus's saveOrUpdate method works, why a primary‑key annotation is required, and how to control insert or update operations using UpdateWrapper or QueryWrapper, including code examples, common pitfalls, and practical tips for handling auto‑increment IDs.

JavaMyBatis-PlusORM
0 likes · 8 min read
Using MyBatis-Plus saveOrUpdate with UpdateWrapper and QueryWrapper