Comments (3)
<fenix id="insertBlogs">
INSERT INTO test.t_blog (c_id, c_title, c_content)
VALUES
@foreach{item : blogs}
( #{ item.id }, #{ item.title }, #{ item.content } )
@end{','}
</fenix>
@Modifying
@QueryFenix(nativeQuery = true)
void insertBlogs(@Param("blogs") List<Blog> blogs);
from fenix.
Fenix 中的 #{}
是编译期间替换的,MVEL 模板引擎是识别不了 #{}
的,你把 #{}
换成 @{}
才行。但是,这样也不是占位符形式的。目前是暂时无法实现 @foreach
方式的占位符形式参数了,因为无法在 MVEL 运行期间去替换字符串数据。
JPA 的批量保存直接调用 saveAll
就行了吧,不需要使用这种 MyBatis
里面的原生写法。
from fenix.
大家可以用 2.4.0
版本,Fenix 中新增的更高效的批量增删改的几个方法哈,效率上相比之前的 saveAll
有很大幅度的提升。
from fenix.
Related Issues (20)
- 多数据源 配置报错 HOT 3
- 希望增加对数据权限拦截的支持 HOT 8
- @QueryFenix 注解原生SQL的分页查询中没有去掉ORDER BY HOT 2
- 动态sql语句xml 标签感觉有点过度设计 HOT 3
- 建议主键生成策略做成枚举 HOT 3
- 请问3.0啥时候发布,迫不及待了 HOT 6
- 模糊查询带%会查出所有内容,xml,javaApi都有这个问题 HOT 2
- 关于同个参数多个不同标签解析like问题 HOT 1
- 基于 Specification 的 Java API 方式 怎么or
- Jakarta EE apis 导致的 java.lang.NoClassDefFoundError: javax/persistence/EntityManager HOT 4
- count语句错误的截取了from关键字
- 给有适配springboot3.0.2计划呀? HOT 1
- spring boot 多数据源如何配置
- 并发一高,连接数上不去。求问 这块连接数怎么配置 HOT 1
- 怎么接受不定字段的返回值 用 List<HashMap<String,Object>>接受不到 HOT 1
- mvel解析xml内的sql语句性能不太好,希望能优化
- 关于适配jpa 3.0.0以上版本 HOT 1
- 多数据源配置报错,A component required a bean named 'entityManagerFactory' that could not be found. HOT 1
- 请问什么时候能否推出一个java17的版本? HOT 3
- 多个@OrEquals优先级 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fenix.