From: George L. (JIRA) <no...@at...> - 2006-01-11 00:24:41
|
daohome.vm named query velocity tests broken -------------------------------------------- Key: HBX-539 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-539 Project: Hibernate Tools Type: Bug Components: hbm2java Versions: 3.1beta2 Reporter: George Lindholm The tests in daohome.vm for type of named query are broken: With this hbm.xml: <query name="NcContactcountAll"> <query-param name="one" type="string"/> <query-param name="two" type="int"/> select count(*) from NcContact </query> and with the current daohome.vm: #if($queryName.startsWith($clazz.entityName)) queryName $queryName startsWith clazz $clazz.entityName #set($methname=$c2j.unqualify($queryName)) #set($params=$cfg.namedQueries.get($queryName).parameterTypes) #set($argList=$c2j.asFinderArgumentList($params,$clazz)) methname = $methname #if($jdk5 && $methname.startsWith("find")) public ${pojo.importType("java.util.List")}<${declarationName}> $methname($argList) { #elseif ($methname.startsWith("count")) public int $methname($argList) { #else public ${pojo.importType("java.util.List")} $methname($argList) { #end you get: queryName NcContactcountAll startsWith clazz NcContact methname = NcContactcountAll public List NcContactcountAll(java.lang.String one, int two) { There is no way that methname (aka queryName) can begin with both $clazz.entityName AND "find"|"count" at the same time. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: George L. (JIRA) <no...@at...> - 2006-01-11 23:18:38
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-539?page=comments#action_21624 ] George Lindholm commented on HBX-539: ------------------------------------- Never mind. My fault for using a class without a package. Sorry > daohome.vm named query velocity tests broken > -------------------------------------------- > > Key: HBX-539 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-539 > Project: Hibernate Tools > Type: Bug > Components: hbm2java > Versions: 3.1beta2 > Reporter: George Lindholm > > > The tests in daohome.vm for type of named query are broken: > With this hbm.xml: > <query name="NcContactcountAll"> > <query-param name="one" type="string"/> > <query-param name="two" type="int"/> > select count(*) from NcContact > </query> > and with the current daohome.vm: > #if($queryName.startsWith($clazz.entityName)) > queryName $queryName startsWith clazz $clazz.entityName > #set($methname=$c2j.unqualify($queryName)) > #set($params=$cfg.namedQueries.get($queryName).parameterTypes) > #set($argList=$c2j.asFinderArgumentList($params,$clazz)) > methname = $methname > #if($jdk5 && $methname.startsWith("find")) > public ${pojo.importType("java.util.List")}<${declarationName}> $methname($argList) { > #elseif ($methname.startsWith("count")) > public int $methname($argList) { > #else > public ${pojo.importType("java.util.List")} $methname($argList) { > #end > you get: > queryName NcContactcountAll startsWith clazz NcContact > methname = NcContactcountAll > public List NcContactcountAll(java.lang.String one, int two) { > There is no way that methname (aka queryName) can begin with both $clazz.entityName AND > "find"|"count" at the same time. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Max R. A. (JIRA) <no...@at...> - 2006-07-07 11:20:55
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-539?page=all ] Max Rydahl Andersen closed HBX-539: ----------------------------------- Resolution: Rejected as wanted ;) > daohome.vm named query velocity tests broken > -------------------------------------------- > > Key: HBX-539 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-539 > Project: Hibernate Tools > Type: Bug > Components: hbm2java > Versions: 3.1beta2 > Reporter: George Lindholm > > > The tests in daohome.vm for type of named query are broken: > With this hbm.xml: > <query name="NcContactcountAll"> > <query-param name="one" type="string"/> > <query-param name="two" type="int"/> > select count(*) from NcContact > </query> > and with the current daohome.vm: > #if($queryName.startsWith($clazz.entityName)) > queryName $queryName startsWith clazz $clazz.entityName > #set($methname=$c2j.unqualify($queryName)) > #set($params=$cfg.namedQueries.get($queryName).parameterTypes) > #set($argList=$c2j.asFinderArgumentList($params,$clazz)) > methname = $methname > #if($jdk5 && $methname.startsWith("find")) > public ${pojo.importType("java.util.List")}<${declarationName}> $methname($argList) { > #elseif ($methname.startsWith("count")) > public int $methname($argList) { > #else > public ${pojo.importType("java.util.List")} $methname($argList) { > #end > you get: > queryName NcContactcountAll startsWith clazz NcContact > methname = NcContactcountAll > public List NcContactcountAll(java.lang.String one, int two) { > There is no way that methname (aka queryName) can begin with both $clazz.entityName AND > "find"|"count" at the same time. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |