[ 
http://jira.andromda.org/browse/SPRING-218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bob Fields resolved SPRING-218.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 3.4
         Assignee: Bob Fields  (was: Chad Brandon)

Fix applied on 4/27/2011

> SpringUtils formatHibernateQueryParameterValue for Enumerations
> ---------------------------------------------------------------
>
>                 Key: SPRING-218
>                 URL: http://jira.andromda.org/browse/SPRING-218
>             Project: Spring Cartridge
>          Issue Type: Bug
>    Affects Versions: 3.4
>         Environment: Windows 7 / MySql
>            Reporter: Andy flury
>            Assignee: Bob Fields
>            Priority: Minor
>             Fix For: 3.4
>
>         Attachments: SpringUtils.java.patch
>
>   Original Estimate: 1 hour
>  Remaining Estimate: 1 hour
>
> Hi
> There is a problem with SpringUtils.formatHibernateQueryParameterValue(). For 
> Enumerations this method returns: 
> param.getValue()
> Template SpringHibernateDaoBase.vsl will therefore output the following 
> inside the Finder Method:
> Query queryObject = super.getSession(false).createQuery(queryString); 
> queryObject.setParameter("parameter", parameter.getValue());
> This gives a problem with the HibernateEnumType, where the parameter is 
> handed to the method disassemble as a "String" and not as an "Enum", which 
> will raise the following error:
> Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to 
> java.lang.Enum
>       at 
> org.andromda.persistence.hibernate.usertypes.HibernateEnumType.disassemble(HibernateEnumType.java:52)
> Within SpringUtils.formatHibernateQueryParameterValue the case about 
> Enumerations should be removed
> I have attached a patch for this

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd

Reply via email to