Changeset 7473


Ignore:
Timestamp:
Apr 12, 2018, 9:48:27 AM (5 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #2113: QueryException? in annotation importer plug-in

We need to also remove the parameter without a suffix if it is found.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.12-stable/src/core/net/sf/basedb/core/hibernate/NativeQueryWrapper.java

    r7465 r7473  
    522522    with a shorter list, Hibernate will try to set the non-existing parameters
    523523    which causes an exception. See http://base.thep.lu.se/ticket/2110
     524    UPDATE: We also need to check for copied parameter (name) in case the list
     525    contained only a single element. See http://base.thep.lu.se/ticket/2113
    524526  */
    525527  @SuppressWarnings({ "unchecked", "rawtypes" })
     
    540542      {
    541543        String name = i.next().getName();
    542         if (name.startsWith(prefixOfParametersToRemove))
     544        if (name.startsWith(prefixOfParametersToRemove) || name.equals(parameterName))
    543545        {
    544546          i.remove();
Note: See TracChangeset for help on using the changeset viewer.