I want fetch all items that contain BLOB field. And I using equals operator for it. When this code executes then exception occures " inconsistent datatypes: expected - got BLOB"
Code:
ParameterMap pm = new ParameterMap();
pm.put(DataConstants.SAVED_ITEM_ID, new Long(itemId));
String select = "SELECT s_item.link "
+ "FROM SavedItem s_item "
+ "WHERE s_item.link.lnkRequest = :request";
Query query = session.createQuery(select)
.setParameter("request", pm, Hibernate.custom(ParameterMapBlobType.class));
return query.list();
Mapping.
Code:
<many-to-one name="type" class="com.coldwellbanker.data.LinkType" not-null="true">
<column name="LTY_LINK_TYPE_ID" />
</many-to-one>