When generating Daos with hbm2dao from Hibernate Tools 3.1beta2 there are no parameters to the methods created from the named queries.
I believe that hbm2dao performs this call to obtain the named queries
Code:
Map m<String, NamedQuerydefinition> = new Configuration().getNamedQueries();
and calls this to obtain the typed parameters
Code:
m.get("foo.Template.findById").getParameterTypes()
Logging at debug-level shows that hibernate doesn't parse the named queries before
Code:
cfg.buildSessionFactory()
is called, and even then the call to
Code:
getNamedQueries()
returns queries with typed parameters. I've checked using a debugger that the variable namedQueries in the Configuration object never contains the typed parameters as far as I can see.
I'm really hoping to generate a dao using this tool!
Thanks in advance!
Hibernate version:
3.1
Mapping documents:
<hibernate-mapping>
...
<query name="foo.Template.findById"><![CDATA[
from Template t
inner join fetch t.components
where t.id = :id
]]>
</query>
</hibernate-mapping>
Name and version of the database you are using:
MSSQL 2000