4 Replies Latest reply on Nov 7, 2007 7:05 AM by Rolf Scherer

    EntityQuery hints map string value

    david castannon Newbie

      How can i set hibernate query hints using EntityQuery if the map values are strings?
      For example:

      hints.put("org.hibernate.cacheMode", CacheMode.REFRESH.toString() );

      give

      Caused by: java.lang.IllegalArgumentException: Value for hint

      Hibernate setHint of QueryImpl expects an CacheMode Object:

      query.setCacheMode( (CacheMode) value );

      Any reason EntityQuery hints map is <String, String> and not <String, Object> ?