[ http://galaxy.andromda.org:8080/jira/browse/SPRING-46?page=history ]
Chad Brandon closed SPRING-46:
------------------------------
Resolution: Fixed
I've added a constraint to make sure anyone attempting to use a collection as a
query argument has the "hibernateUserNamedParameters" set to true.
> Entity query operation generates DaoBase code with a compilation error
> ----------------------------------------------------------------------
>
> Key: SPRING-46
> URL: http://galaxy.andromda.org:8080/jira/browse/SPRING-46
> Project: Spring 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://galaxy.andromda.org:8080/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
-------------------------------------------------------
This SF.net email is sponsored by: 2005 Windows Mobile Application Contest
Submit applications for Windows Mobile(tm)-based Pocket PCs or Smartphones
for the chance to win $25,000 and application distribution. Enter today at
http://ads.osdn.com/?ad_id=6882&alloc_id=15148&op=click
_______________________________________________
Andromda-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/andromda-devel