Changeset 7733


Ignore:
Timestamp:
Aug 7, 2019, 8:54:06 AM (2 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #2187: ClassCastException? when trying to create a new item

It seems like the issue was caused by a side-effect to the changes made in [7605] #2151. The introduction of implicit casting to the PropertyFilter.getValueAsObject() caused the compiler to select the Expressions.parameter(String, Type) method instead of the Expressions.parameter(String, Object) method. Solved by using Expressions.parameter(String, Object, Type) instead.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.15-stable/src/clients/web/net/sf/basedb/clients/web/Base.java

    r7697 r7733  
    17581758    query.include(Include.MINE, Include.SHARED, Include.IN_PROJECT, Include.OTHERS);
    17591759
    1760     Expression parameter = filter.getValue() == null ? null : Expressions.parameter("context", filter.getValueAsObject());
     1760    Expression parameter = filter.getValue() == null ? null : Expressions.parameter("context", filter.getValueAsObject(), filter.getValueType());
    17611761    Restriction r = filter.getOperator().getRestriction(Hql.property(property), parameter);
    17621762    query.restrict(r);
Note: See TracChangeset for help on using the changeset viewer.