slyak / spring-data-jpa-extra

spring data jpa with template dynamic query (eg: freemarker,velocity etc.) like mybatis. The master branch already support springboot2+ spring5+
Apache License 2.0
400 stars 116 forks source link

出现一个问题,stfl文件中的if条件没起作用,if中的语句没有拼接到sql上 #53

Closed myfairys closed 4 years ago

myfairys commented 4 years ago

--findDtos SELECT id, name FROM zk_user where 1=1 <#if (name??)> AND name like :name </#if>

Hibernate: / dynamic native SQL query / SELECT id, name FROM zk_user where 1=1 没有拼接name条件语句

stormning commented 4 years ago

<#if name??>

stormning commented 4 years ago

注意接口中,name前面要加注解 @Param