序言 Spring Data JPA作为Spring Data中对于关系型数据库支持的一种框架技术,属于ORM的一种,通过得当的使用,可以大大简化开发过程中对于数据操作的复杂度. 本文档隶属于<Spring Data JPA用法与技能探究>系列的第一篇.本系列文档规划对Spring Data JPA进行全方位的使用介绍,一共分为5篇文档,如果感兴趣,欢迎关注交流. <Spring Data JPA用法与技能探究>系列涵盖内容: 开篇介绍 -- <JDBC.ORM.JPA.Sp
1. Mybatis插入实体类字段为关键字解决方案 1.1. 前言 可能你插入字段为关键字时报如下错误,且字段名不适合改变 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 1.2. 方案一 若自己写的sql,直接在插入语句中字段加上``,比如 insert into (id,`l
Java语法: private String[] tagIds; MyBatis语法 <delete id="deleteByIds" parameterType="java.util.List" > delete from BIZ_USER_TAG_REL where ID in <foreach item="item" index="index" collection="list" o
有一个需求是可以选择多个设备进行删除,于是想到将多个设备id拼成字符串作为参数,以逗号隔开,如:"123,234,456". SQL如下: <delete id="deleteLineEquip" parameterType="String"> delete from AXX_LINE_EQUIP e where e.EQUIP_ID in (${ids}) </delete> 但是系统在执行时老是报错,提示数据类