Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

批量插入不支持占位符的方式吗? #38

Open
xiehonghpu opened this issue Nov 5, 2018 · 2 comments
Open

批量插入不支持占位符的方式吗? #38

xiehonghpu opened this issue Nov 5, 2018 · 2 comments

Comments

@xiehonghpu
Copy link

使用freemarker的<#list></#list>标签进行遍历,无法使用占位符。如使用占位符则会遍历失效。
image
如上,占位成功,但提交语句时占位符未正确赋值。
image
如上图,这种在遍历时不使用占位符的才可成功生成sql并执行。

@stormning
Copy link
Collaborator

原则上不会失败,看看最终SQL是否有误,或者你的占位符是否忘了使用@param

@xiehonghpu
Copy link
Author

xiehonghpu commented Nov 8, 2018

1.sql无误
2.有使用@param
3.是结合<#list></#list>标签后,会出现占位符未成功赋值。或者换个方式说,是有占位,但是在最终生成sql时,根据该占位符未找到遍历的子元素。@param注释的是整个list,遍历时是使用list的子元素

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants