[hibernate-issues] [Hibernate-JIRA] Closed: (HBX-714) Double methods generated in dao layer for named queries with pojo names starting with the same name

Max Rydahl Andersen (JIRA) noreply at atlassian.com
Tue Aug 8 09:34:18 EDT 2006


     [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-714?page=all ]
     
Max Rydahl Andersen closed HBX-714:
-----------------------------------

    Fix Version: 3.2beta7
     Resolution: Fixed

fixed

> Double methods generated in dao layer for named queries with pojo names starting with the same name
> ---------------------------------------------------------------------------------------------------
>
>          Key: HBX-714
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-714
>      Project: Hibernate Tools
>         Type: Bug

>  Environment: Wondows Xp, Eclipse 3.2  Hibernate tools 3.2.beta6a, Ant 1.6.5, JDK 1.5.0_06
>     Reporter: Jacob Bergoo
>     Priority: Critical
>      Fix For: 3.2beta7

>
>
> This is the file for my named queries:
> <?xml version="1.0"?>
> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
> "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
> <hibernate-mapping>
>    
>    <query name="com.mycompany.business.model.AppUser.findByUsername">
>         from AppUser where userName=:username
>        <query-param name="userName" type="string" />
>    </query>
>    
>    <query name="com.mycompany.business.model.AppUserRole.findByUserRole">
>         from AppUserRole where userRole=:userRole
>         <query-param name="userRole" type="string" />
>    </query>
> </hibernate-mapping>
> This Queries is for two different pojos and I want them to end up in the corresponding dao classes. But becouse they have a name that is similar... AppUser and AppUserRole this means that both methods ends up in AppUserDao and one in AppUserRoleDao.... I have tried this also with other classes that share that same name prefix and I have the same behavior there...

-- 
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




More information about the hibernate-issues mailing list