[ http://thecla.homeftp.net:8380/jira/browse/HIB-70?page=history ]

Chad Brandon reassigned HIB-70:
-------------------------------

    Assign To: Chad Brandon  (was: Martin West)

> Entity query operation generates DaoBase code with a compilation error
> ----------------------------------------------------------------------
>
>          Key: HIB-70
>          URL: http://thecla.homeftp.net:8380/jira/browse/HIB-70
>      Project: Hibernate Cartridge
>         Type: Bug
>     Versions: 3.0M3
>  Environment: MagicDraw 9
>     Reporter: Greg Holmberg
>     Assignee: Chad Brandon
>     Priority: Minor
>      Fix For: 3.0RC1

>
>
> I have an <<Entity>> class, Document, with this operation:
>     findEntitiesByDefinitions( definitions : List ) : List
>     Query: true
>     Scope: classifier
>     Visibility: public
> This generates this code:
> ÂÂÂ public java.util.List findEntitiesByDefinitions(final int transform, 
> final java.lang.String queryString, final java.util.List definitions)
> ÂÂÂ {
> ÂÂÂÂÂÂÂ try
> ÂÂÂÂÂÂÂ {
> ÂÂÂÂÂÂÂÂÂÂÂ net.sf.hibernate.Query queryObject = 
> super.getSession(false).createQuery(queryString);
> ÂÂÂÂÂÂÂÂÂÂÂ queryObject.setParameterList(0, definitions);
> ÂÂÂÂÂÂÂÂÂÂÂ java.util.List results = queryObject.list();
> ÂÂÂÂÂÂÂÂÂÂÂ transformEntities(transform, results);
> ÂÂÂÂÂÂÂÂÂÂÂ return results;
> ÂÂÂÂÂÂÂ }
> ÂÂÂÂÂÂÂ catch (net.sf.hibernate.HibernateException ex)
> ÂÂÂÂÂÂÂ {
> ÂÂÂÂÂÂÂÂÂÂÂ throw super.convertHibernateAccessException(ex);
> ÂÂÂÂÂÂÂ }
> ÂÂÂ }
> The method net.sf.hibernate.Query.setParameterList(int, List) doesn?t exist, 
> so the javac compiler says ?cannot resolve symbol?.
> There is a setParameterList(String name, Collection vals). The code author 
> was probably hoping for a call similar to setParameter(int position, Object 
> val), but unfortunately a List version of this (i.e. that takes a position
> int) isn?t provided by Hibernate. Apparently one must specify the parameter 
> name, not the position.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://thecla.homeftp.net:8380/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
Andromda-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/andromda-devel

Reply via email to