Dear,
when I configure hbmtemplate to use explicitly daohome, I get an error:
freemarker.core.InvalidReferenceException: Expression ejb3 is undefined on line 10, column 6 in dao/daohome.ftl.
yes we can see at line 10 the ejb3 statement -> https://github.com/hibernate/hibernate-tools/blob/master/src/templates/dao/daohome.ftl
How to resolve this issue ?
Thanksas example I use an ant task throw gradle (is easy )
Code:
def hbm2dao(final Project project){
project.ant {
taskdef(name: "hibernatetool",
classname: "org.hibernate.tool.ant.HibernateToolTask",
classpath: config.classPath
)
hibernatetool( destdir : config.srcGeneratedDir ) {
jdbcconfiguration(
configurationfile: "${config.hibernateConfigXml.path}",
revengfile: "${config.hibernateRevEngXml.path}",
packagename: "${project.database.basePackage}.dao"
)
hbmtemplate( template:"dao/daohome.ftl", filepattern: "${project.database.basePackage}/dao/{class-name}DAO.java")
hbm2dao(
jdk5: true,
ejb3: true
)
classpath {
pathelement( path: "config" )
}
}
}
}