hbm.sql-query.hbm.ftl Maven / Gradle / Ivy
<#foreach queryDef in md.namedNativeQueryDefinitions>
flush-mode="${queryDef.flushMode.toString().toLowerCase()}"
<#if queryDef.isCacheable()>
cacheable="${queryDef.isCacheable()?string}"
<#if queryDef.cacheRegion?exists>
cache-region="${queryDef.cacheRegion}"
<#if queryDef.fetchSize?exists>
fetch-size="${queryDef.fetchSize}"
<#if queryDef.timeout?exists>
timeout="${queryDef.timeout?c}"
>
<#if queryDef.querySpaces?exists>
<#foreach tableName in queryDef.querySpaces>
<#if queryDef.queryReturns?exists>
<#foreach returnDef in queryDef.queryReturns>
<#assign returnTag = c2h.getNamedSQLReturnTag(returnDef)>
<${returnTag}
alias="${returnDef.alias}"
<#if c2h.isNamedSQLReturnRoot(returnDef)>
class="${returnDef.returnEntityName}"
<#elseif c2h.isNamedSQLReturnRole(returnDef)>
property="${returnDef.ownerAlias}.${returnDef.ownerProperty}"
<#elseif c2h.isNamedSQLReturnCollection(returnDef)>
role="${returnDef.ownerEntityName}.${returnDef.ownerProperty}"
<#if returnDef.lockMode?exists>
lock-mode="${returnDef.lockMode.toString().toLowerCase()}"
/>